Download from Digital Ocean - Server Side

Hello Everyone,

Here I go again with download files from Digital Ocean (S3 Connector).
I searched over the forum but did not found a clear explanation on how the “Download File” and “Get File” component works.

Here is what I need to do:

I have a query returning all the files I need to download, created a repeat with this query and need to download each one in a temp folder to zip them all afterwards.

I tried GetFile:

Bucket: the name of my bucket
Key: the path + file name inside of the bucket
Path: Where I need to store the file

I got this error…Looks like it is searching for the path of the file inside of the target folder…

Then I tried Download File:

Got this error…but the key is being informed correctly.

{status: "500", message: "s3.downloadFile: key is required.",…}
message: "s3.downloadFile: key is required."
stack: "Error: s3.downloadFile: key is required.\n    at App.parseRequired (/opt/node_app/lib/core/app.js:473:19)\n    at App.downloadFile (/opt/node_app/lib/modules/s3.js:106:26)\n    at App._exec (/opt/node_app/lib/core/app.js:435:57)\n    at App._exec (/opt/node_app/lib/core/app.js:406:28)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n    at async App.exec (/opt/node_app/lib/core/app.js:375:9)\n    at async App.repeat (/opt/node_app/lib/modules/core.js:72:17)\n    at async App._exec (/opt/node_app/lib/core/app.js:435:30)\n    at async App._exec (/opt/node_app/lib/core/app.js:406:17)\n    at async App.exec (/opt/node_app/lib/core/app.js:375:9)"
status: "500"

Thanks and have a great week!

any tip @Teodor ? :smiley:

I think it’s a very stupid question LOL!

Anyone?

I'm not sure this can be done as far as I know you can only manipulate files within the Projects root directory so you will need to download them to the desktop and then upload them to the temp directory for processing with the Zip component, then onward to your S3 storage? You can't do what you require within Server Connect alone. The way around this would be to Zip the files on upload to S3 in a temp directory within your Project, then offer the link from S3 as your download source. Ie, do all the processing (Zip etc) within the root directory of the Project then transfer to S3, you can not achieve this the other way round. Check with @George but am sure am correct..?

1 Like