Save to Firebase Database the url of the image or text stored in Firebase Storage

Guys, I’m using Activity Starter and Web components. The first one to open a website where the Background for mobile will be downloaded. This same Active Starter is used to select the file that was downloaded and save it through the Web in firebase Storage and this same process is also done for images.


I used Got Text to know the saved url: https://firebasestorage.googleapis.com/v0/b/severinoresolve4fe8d.appspot.com/o/Antecedentes%20Criminals%2F.pdf
when I put it in the browser it appeared like this:

image

I need to show both the file and the photo for profile consultation and I would like to save the url in the individual’s registration data.
Can someone help me?

In the got text block , do not catch the global variable just use any of the variable given in the got text block like get URL, get response content, get response code and try.

If you want to save the detail, then use firebase component blocks to save

Could you give me an example because who taught us here in the community to store image or text as an alternative to Firebase Storage, both native and by extension, didn’t put the inverse type to show both the image and the PDF in the app?

Have you read ?

So Dora I’ve already done that and it worked to save and return the Firebase Storage storage URL to Firebase Data Base for image. Perfect! The problem is for .doc and .pdf files. I use Activity Starter to get the file in my mobile’s download folder but the return to save to Firebase Storage is the problem. Using the After Activity block the return (using a label) of the Result URI is the document number.

See here:

In essence, you use more or less the same url as you used to upload the file in the first place :slight_smile:

1 Like

The problem is that I don’t know how to do this in the case of downloading to get the token. Anyone able to help me?

“You will see to the left what is returned. We really only need two of these items, the downloadTokens and the name. These need to be captured on return and saved off into a list (or preferably up to a Firebase tag) so that they can be recalled later to display or download the image. You will note that the full path - online is returned, including any folders.”

Returns:

[[“bucket”, “myProject.appspot.com”], [“contentDisposition”, "inline; filename=utf-8’'myimage1.png"], [“contentEncoding”, “identity”], [“contentType”, “image/png”], [“crc32c”, “AlvaFg==”],* [“downloadTokens”, “69c52b42-32d1-40a0-9b98-574872eeed2c”] , [“etag”, “CO+Dx4SB1ewCEAE=”], [“generation”, “1603809785790959”], [“md5Hash”, “ZGOY4M+44ZmWCTAHLvtCtQ==”], [“metageneration”, “1”], [“name”, “FBDEMONOSEC/myimage1.png”] , [“size”, “38106”], [“storageClass”, “STANDARD”], [“timeCreated”, “2020-10-27T14:43:05.790Z”], [“updated”, “2020-10-27T14:43:05.790Z”]]

Try to use dictionary method to call the required value from the response.

Or convert the response into list , then use select list item list block

I am looking for the same thing.
I have a form with text fields and one image field. The image is saving in the firebase storage, but I coul not retrieve the image’s URL and save it with the other fileds into firebase to show it later when the user profile load.

How to convert this answer there into a list?

Try with dictionary method, check with get keys, get values… then go for get value for the key or check with calling airtable values in to list by dictionary method

If I use the web component. The URL would be: https://firebasestorage.googleapis.com/v0/b/

Web Go text
In bucket:severinoresolve4fe8d.appspot.com

Key >>>ver Key>>>>bucket

Would it be this?

Why bucket? You want value or need to save??

I want is the value. That’s what I’m trying to explain. On the first slide I’m saving my mobile PDF in Firebase. Now I want to show this PDF which is in Firebase to my client every time he wants to see it and I don’t know how to do it? This tutorial is well explained but how to create a list to download the token. The structure I set up is: List of Professionals folder/Folder Professional name/file name.pdf . I believe that may be the doubt of many people.

if you give me the link, let me try it

Your url to a file in a subFolder might look like this:

https://firebasestorage.googleapis.com/v0/b/myProject.appspot.com/o/FBDEMONOSEC%2Ffolder1%2Ffolder2%2Fmyimage150.png?alt=media&token=35f17209-204c-4eb8-ba24-f038850490f6

where the file is in:

/FBDEMONOSEC/Folder1/Folder2/myimage150.png

It is important to maintain the %2F which is the ASCII replacement for /

Why is it difficult to store this in a list ?

https://firebasestorage.googleapis.com/v0/b/severinoresolve4fe8d.appspot.com/o/Lista%20de%20Profissionais%2FAntecedentes%20Criminais%2FRichard%20Gere%2FDocAnte.pdf?alt=media&token=a4c760e4-3a5c-4d4b-b36e-aedf8e727cd1

This is not i am asking, that json list link , from which only you want to extract information na

Sorry,
See below:
{
“name”: “Lista de Profissionais/Antecedentes Criminais/Richard Gere/DocAnte.pdf”,
“bucket”: “severinoresolve4fe8d.appspot.com”,
“generation”: “1636469080133984”,
“metageneration”: “1”,
“contentType”: “application/pdf”,
“timeCreated”: “2021-11-09T14:44:40.135Z”,
“updated”: “2021-11-09T14:44:40.135Z”,
“storageClass”: “STANDARD”,
“size”: “33095”,
“md5Hash”: “x7SdVCjKImYh1UkdgTt8Ig==”,
“contentEncoding”: “identity”,
“contentDisposition”: “inline; filename*=utf-8’'DocAnte.pdf”,
“crc32c”: “hizEZg==”,
“etag”: “COCi1LHCi/QCEAE=”,
“downloadTokens”: “a4c760e4-3a5c-4d4b-b36e-aedf8e727cd1”
}

GSR, I’m going to try to get the URL path through the FileTools extension on the Activity Starter’s return. If it works put here.