Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
145
rated 0 times [  147] [ 2]  / answers: 1 / hits: 21747  / 8 Years ago, sat, june 4, 2016, 12:00:00

Right now, the Firebase documentation guides you on uploading files to Firebase Storage by using their JavaScript library.



I am operating a server without NodeJS installed. Is it possible to upload files like image, audio, through the Firebase REST API?



At the moment I am using curl in a bash script to send JSON. I would prefer not to store base64 encoding in a database field, I want the file to be stored in a folder inside the Storage section.



Storage folder shown below:



Storage


More From » jquery

 Answers
2

Firebase Storage uses Google Cloud Storage under the hood, so you can use the GCS REST API to get 90% of the way there. (Docs here.)



There's a couple differences.




  1. Download URLs won't be automatically generated until you access it through the Firebase Storage SDK.

  2. You won't be able to use Firebase Authentication to upload through the GCS REST endpoint. You'll either need to set up OAuth (which, you might be able to get through Google Sign in with Authentication) or a service account. (Here's an example of how you can authenticate from Node.js to GCS.)


[#61907] Wednesday, June 1, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
quentinaveryb

Total Points: 102
Total Questions: 100
Total Answers: 93

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
quentinaveryb questions
Thu, Aug 6, 20, 00:00, 4 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
Mon, Aug 12, 19, 00:00, 5 Years ago
;