How do I send and retrieve files with CloudDB/Firebase?

I would like to create an app where a user can upload a file and the other users can download it using CloudDB. I haven't been able to find any solutions in the community.

I suppose Firebase would be ok too, I just don't want to use it because it's experimental, and I don't want my app to break.

CloudDB

See here for examples:

You must store a file in cloudDB using a separate tag, just for one file. You must provide a full path to the file on your android device. Note that using the MIT provided redis database does not guarantee data reliability (it could be overwritten) and heavy use of the service may result in your requests being blocked.

You can setup your own redis server to use with cloudDB components:

or you could do this:

Firebase

Using the web component and the REST API is not "experimental". It is recommended to use Firebase Storage to store and retrieve files.

See here:

The Firebase Storage URL requirements

you may want to read around the other information in this guide to get a fuller understanding of how everything works

1 Like

Firebase does look better but I still can't figure it out. Can I see an aia of the Firebase Storage thing to see how it works?

Are the examples I provide in my guide not enough?

What else do you need to know ?

Regardless, please see aia and blocks example below.

In order to be able to download the file correctly, You have to leave out setting the content type in the web headers.

You will need to set the variables for your projectName and folderName.

fbStorageDemo.aia (3.8 KB)

Thanks!