I want to download a file created with CloudFunctions.
In the function that triggers when a file is uploaded to Storage, after tampering with the file in the temp directory, how can you download the changed file directly to CloudFunctions instead of uploading it to Storage once? .
If that is not possible, I think that AngularFireStorage will be used, but AngularFireStorage seems to be the specification to get the download URL from the return value variable when I upload the file, this time final The file I want to download is different from the uploaded file, so you can't use it.
Is there no choice but to use a raw FirebaseSDK?
Please give me an answer.
Answer # 1
How can I download directly with CloudFunctions?
This is impossible.
If that wasn't possible, I would use AngularFireStorage
Since it was not possible, the only option is to download the necessary files from the client when needed. That's where FirebaseSDK is used.
If you are using Angular, you can use the listed AngularFireStorage.
In the function that triggers when a file is uploaded to Storage, after tampering with the file in the temp directory, instead of uploading the changed file to Storage
Upload the new (created) file to Storage.
As described above, the necessary files will be downloaded from the client when necessary.
This time, the file you want to download finally is different from the uploaded file, so it's not possible to use it.
Is this the subject of your work?
In order to solve this, I think there are only the following two options.
Make regularity to the file path after the change (Make sure to create the same file name under any directory etc.)
Example) File path before change: hoge.jpg → File path after change: converted/hoge.jpg
If the client uploads with hoge.jpg, make sure to go to the same file name under the converted
Save the changed file path in a database (Firestore, Realtime Database, etc.)
The client accesses the database in advance and confirms the location of the file
- terminal - i can't download firebase
- firebase - method to create user created displayid separately from document id in firestore
- firebasejson file not created with firebase init
- i want to deploy a web application created with laravel with firebase
- information such as api key can be confirmed in moro on the web page created with firebase hosting
- i want to download the data in the firebase real-time data
- swift - firebase download image
- typescript - i want to count the number of elements in the collection, including the data that was originally entered in firesto
- typescript - i want to count the number of documents of firebase cloud firestore only for last month
- i want to authenticate firebase with liff
- android - about google login signature
- ionic + firebase account registration, displayname becomes null
- typescript - error when building with --prod in an application using ionic/angular
- ios - module 'firebaseinstanceid' not found
- ios - the default firebase app has not yet been configured
- ios - firebaseinstanceid not found