S3 DO Repeat attempt

I have a small work in progress file I'm attempting to load multiple files to a DO Spaces bucket.


Issue:
Only the first file loads to DO and that file is the only one removed from the uploads folder. All the files do load into the uploads folder.
Haven't done an S3 scenario like this before so any guidance is welcome

Hi Jim,

upload[0].name means only the first file (index 0) in the repeat will be uploaded to DO. Within a repeat, just use name and path as the Key and Path respectively.

Thanks, guptast... without the [0] there's a 500 error:

{status: "500", message: "s3.uploadFile: path is required.",…}
message
: 
"s3.uploadFile: path is required."
stack
: 
"Error: s3.uploadFile: path is required.\n    at App.parseRequired (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:759:13)\n    at App.putFile (C:\\wamp64\\www\\hoa_member\\lib\\modules\\s3.js:59:40)\n    at App._exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:717:49)\n    at App._exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:684:20)\n    at App.exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:653:16)\n    at App.repeat (C:\\wamp64\\www\\hoa_member\\lib\\modules\\core.js:80:28)\n    at App._exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:717:49)\n    at App._exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:684:20)\n    at async App.exec (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:653:5)\n    at async App.define (C:\\wamp64\\www\\hoa_member\\lib\\core\\app.js:635:5)"
status
: 
"500"

Followed this tutorial Wappler Documentation - Using S3 Connector the [0] is added automatically when using the data picker as directed. At this line, "Then select a dynamic value for the file path:" I noticed the [0] not present and tried it - only the local file upload works and the 500 error. Is this a bug with the data picker and how to I find what's causing the error.

I came across this old unanswered post of mine in 2021 trying to use the App Connect S3 Upload, this is one that has beaten me before. :slight_smile:

You're using "upload.name"? It's wrong, it's just "name". The Repeat step creates variables like "name" (that exists in the object being repeated) in the iteration's scope

If the above doesn't solve the issue, please post a screenshot

1 Like

Thanks Apple and guptast - Too many hours yesterday on this and a bit foggy today. Didn't have my coffee and did some more overthinking - just took out the [0] instead of doing what guptast posted. Apple - always appreciate your assistance.

A note in the tutorial about this would have saved me a day, fiddling with it.

1 Like