firebasefirebase-storage

Copy a file on firebase storage?


Is it possible to copy an existing file on firebase storage without needing to uploading it again?

I need it for a published/working version setup of my app.


Solution

  • UPDATE

    Now it's possible:

    import { Storage } from '@google-cloud/storage'
    
    const storage = new Storage({
        projectId: 'your-project-id',
        keyFilename: 'your-admin-keycert.json'
    })
    
    const copyResponse = await storage.bucket('your-bucket').file(`your-file`).copy(`new-destination`)