Sending file using sharing component

Hi
I am unable to figure out how to send files (image) using the sharing component.
When I add the name of the png saved in the media using the sharing component, the pop-up saying the file is not found comes. Do we have to store the file in the tiny DB first?
Can you please suggest ways to do so?
Thank you

1 Like

Show your blocks and see also here:

this is what my blocks look like

You cannot share a file from the assets or the Private data directory.

So I will have to follow these steps to share my file ?

Where is the image stored? If it is in the assets you need to copy it first the external storage (best to the ASD) and share it from there.

1 Like

Yes, it is stored in the assets. Thank you , I will try that.

... using the TaifunFile or FileTools extension.

Thank you.
Also, can you please guide how to share the highscore that is being saved in the Tiny DB.

I'm on the go and not at my computer.
(Posted from my mobile phone.)

Why do you use the comparison = as message? The result of the comparison is Boolean true or false, so your shared message will be "true" or "false".

yes , i was figuring out a was i can add the global number to the message while sharing.
Can you pls suggest ways to concatenate the variable and the message along with it

Use the text join block

image

1 Like

Hello,
you can also see here: http://ai2.appinventor.mit.edu/reference/components/social.html#Sharing.ShareFileWithMessage
to understand how to "find" the file that you want to send, I mean the directory.
This is what I saw and did that in the picture:

To help you understand... I have a folder called "apt" in my files and I want to send the file "ind_users.txt" which is IN THE folder "apt".
And the idea of "join" that somebody has told you is this.

I hope you' re fine!