firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.54k stars 1.44k forks source link

FR: Move files between directories in Firebase Storage without deleting and re-uploading #1910

Open willbattel opened 5 years ago

willbattel commented 5 years ago

Currently the only way to relocate a file in Firebase Storage is to delete the original and re-upload to the new location. This usually isn't disastrous, but it's far from optimal. If I'm not mistaken, Google Cloud Storage, which is the backbone for Firebase Storage, does allow file move requests. Is this a feature we could discuss for inclusion in a future version of Firebase Storage?

derhuebiii commented 4 years ago

+1

WaseemRakab commented 3 years ago

up for this !! we needs this

KevinhoMorales commented 3 years ago

Go ahead Firebase! Please We needs this!

jelizarovas commented 2 years ago
  bucket.file("src/Screenshot (1).png").move("dest/file.png");

works

Note: it will still call onFinalize storage function - if you have thumbnails generation cloud function it will run on every move, so technically no need to move thumbnail files.

Edit: Sorry, did not notice this was ios sdk - i've tested it on admin sdk

Edit2: If there is none in ios sdk, you can set up cloud function that moves files via admin sdk