Is there a way to move files with firebase.storage()?
Example: user1/public/image.jpg to user1/private/image.jpg
You asked for it, and it's finally here: file storage for Firebase developers! Firebase Storage is a stand-alone solution for uploading user generated content like images and videos from an iOS and Android device, as well as the Web.
First, you order the appliance through the Cloud Console. Once it is shipped to you, you copy your data to the appliance (via a file copy over NFS), where the data is encrypted and secured. Finally, you ship the appliance back to Google for data transfer into your GCS bucket and the data is erased from the appliance.
Since Firebase Storage is backed by Google Cloud Storage, you can use GCS's rewrite
API (docs) or gsutil mv
(docs).
Also, an example of move
(docs) in GCloud Node follows:
var bucket = gcs.bucket('my-bucket'); var file = bucket.file('my-image.png'); var newLocation = 'gs://another-bucket/my-image-new.png'; file.move(newLocation, function(err, destinationFile, apiResponse) { // `my-bucket` no longer contains: // - "my-image.png" // // `another-bucket` now contains: // - "my-image-new.png" // `destinationFile` is an instance of a File object that refers to your // new file. });
There is no such way to move to other location, rather you can download and then put it to other reference and deleting the previous location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With