I am using a Google Cloud Function to send files from Cloud Storage to Sharepoint using the Sharepoint REST API. This works great except for large files because the function runs out of memory (set to max 2gb).
Currently, the Cloud Function is triggered when a new file arrives at the storage bucket. It downloads this file into the /tmp
directory and then makes a POST request to the Sharepoint endpoint.
Is there a way to bypass downloading the file to /tmp
? Can a POST request be made by specifying a remote file location? Other recommendations?