Hello Team,
I have a question. In GCP, when I try to download a file from Cloud Storage using Java, I encounter a memory issue. Since Cloud Functions have memory limitations, I chose to use a Cloud Function for the file download. However, it returns the file content instead of downloading the file. Is it possible to download a file using a Cloud Function?
To successfully download the file into the temporary folder of a Cloud Function and from there you can copy this file into a bucket.
In order to achieve this, download the file using createWriteStream
into the /tmp folder since is the only folder where we can store files in a Cloud Function, as stated in the Cloud Functions Execution Environment documentation.
After that, copy the file to a bucket following this Cloud Storage Uploading Objects documentation.
Hello,
Thank you for your engagement regarding this issue. We haven’t heard back from you regarding this issue for sometime now. Hence, I'm going to close this issue which will no longer be monitored. However, if you have any new issues, Please don’t hesitate to create a new issue. We will be happy to assist you on the same.
Regards,
Sushma