Firebase Storage get download URL
Generate Firebase Storage download URLs
Generate download URLs for files stored in Firebase Storage. An array of files with a 'uploadPath' or 'path' property should be provided as the input.
If the download URL is successful, the first output is triggered and the files with download URLs are returned.
If download URL generation fails for at least one but not all of them, the second output is triggered.
If the download URL generation fails for all files, the third output is triggered.
Note: Firebase needs to be initialized before this flow function can be used. Also, if access to the Firebase Storage resource is restricted make sure user is authenticated and has the required permissions to access it.

Input arguments

Label
Key
Type
Required?
Default
Description
Files to get download URLs for
files
Array
Yes
Object describing the file to get the download URL for.
Custom path
uploadPath
String
No
Custom path for uploaded files - this determines the folder structure in Firestore. If custom path is not provided (`No value` from binding editor or `undefined` via formula), the folder structure will be copied from the device. Note: that the custom upload and download paths need to match.

Output arguments

Number of outputs: 2
Label
Key
Type
Description
Uploaded files
files
Array
Object describing the file with a download URL.
    Local path
files.path
String
Absolute local filesystem path representing the file location on the device, including the filename and extension. On web, this is created via the [`createObjectURL`](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) method.
    MIME type
files.mimeType
String
MIME type of the file, if it could be determined.
    Name
files.name
String
Name of the file in the local filesystem, if applicable. Note that the filename and extension are included in the **Local path** property already.
    Size
files.size
Number
Size of the file, in bytes.
    Created at
files.createdAt
String
Creation datetime of the file, if it can be determined.
    Modified at
files.modifiedAt
String
Datetime when the file was last modified, if it can be determined.
    Upload path
files.uploadPath
String
Firebase Storage path where the file is uploaded
    Upload status
files.uploadStatus
Object
Upload status for the file
    Download URL
files.downloadUrl
String
URL to download the uploaded image. Depending on the Firebase configuration the URL is valid only temporarily and should be re-fetched using the Get Firebase Storage download URL flow function for later access.
Uploaded files
erroredFiles
Array
Object describing the file for which the download URL generation failed.
    Local path
erroredFiles.path
String
Absolute local filesystem path representing the file location on the device, including the filename and extension. On web, this is created via the [`createObjectURL`](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) method.
    MIME type
erroredFiles.mimeType
String
MIME type of the file, if it could be determined.
    Name
erroredFiles.name
String
Name of the file in the local filesystem, if applicable. Note that the filename and extension are included in the **Local path** property already.
    Size
erroredFiles.size
Number
Size of the file, in bytes.
    Created at
erroredFiles.createdAt
String
Creation datetime of the file, if it can be determined.
    Modified at
erroredFiles.modifiedAt
String
Datetime when the file was last modified, if it can be determined.
    Upload path
erroredFiles.uploadPath
String
Firebase Storage path where the file is uploaded
    Upload status
erroredFiles.uploadStatus
Object
Upload status for the file
    Download URL
erroredFiles.downloadUrl
String
URL to download the uploaded image. Depending on the Firebase configuration the URL is valid only temporarily and should be re-fetched using the Get Firebase Storage download URL flow function for later access.
Uploaded files
successfulFiles
Array
Object describing the file with a download URL.
    Local path
successfulFiles.path
String
Absolute local filesystem path representing the file location on the device, including the filename and extension. On web, this is created via the [`createObjectURL`](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) method.
    MIME type
successfulFiles.mimeType
String
MIME type of the file, if it could be determined.
    Name
successfulFiles.name
String
Name of the file in the local filesystem, if applicable. Note that the filename and extension are included in the **Local path** property already.
    Size
successfulFiles.size
Number
Size of the file, in bytes.
    Created at
successfulFiles.createdAt
String
Creation datetime of the file, if it can be determined.
    Modified at
successfulFiles.modifiedAt
String
Datetime when the file was last modified, if it can be determined.
    Upload path
successfulFiles.uploadPath
String
Firebase Storage path where the file is uploaded
    Upload status
successfulFiles.uploadStatus
Object
Upload status for the file
    Download URL
successfulFiles.downloadUrl
String
URL to download the uploaded image. Depending on the Firebase configuration the URL is valid only temporarily and should be re-fetched using the Get Firebase Storage download URL flow function for later access.

Events

No events.

Errors

Label
Code
Description
Unknown error
unknown
Thrown when trying to generate download URLs for files resulted in an unknown error.
All files failed
allFilesFailed
Thrown if download URL generation fails for all files
No files to download
noFilesToDownload
Thrown if there are no files to generate a download URL for
Last modified 2mo ago
Export as PDF
Copy link