How Can I Keep Spaces in a File Name when Uploading to an S3 Bucket?

This topic was automatically generated from Slack. You can find the original thread here.

Hi, guys! I have a workflow to upload a ZOOM recording to a S3 Bucket. This morning I was updating it, and the AWS Step suggested to update, which I did. And then it stopped working. The reason is I have SPACES in the file name. Now, when I try to stream a url to S3 I get a message “Request path contains unescaped characters”. If I remove the spaces, it works fine. If I encodeURI() it, it works, but the file name replaces SPACE with %20. I’d like to keep the spaces in the file name. Any hints?

TypeError
Request path contains unescaped characters

DETAILS
at null.__node_internal_captureLargerStackTrace (internal/errors.js:412:5)
at null.__node_internal_addCodeToName (internal/errors.js:168:9)
at NodeError.NodeError (internal/errors.js:322:7)
at ClientRequest.ClientRequest (_http_client.js:155:13)
at null.request (https.js:370:10)
at null.null (/tmp/__pdg__/dist/code/f3a7fa5082223a237075d32a47d96d7456d34f584189bd7b87c74cb52faa8534/node_modules/.pnpm/@aws-sdk+node-http-handler@3.290.0/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http-handler.js:70:25)
at null.Promise (null:null:null)
at NodeHttpHandler.handle (/tmp/__pdg__/dist/code/f3a7fa5082223a237075d32a47d96d7456d34f584189bd7b87c74cb52faa8534/node_modules/.pnpm/@aws-sdk+node-http-handler@3.290.0/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http-handler.js:49:16)
at null.null (/tmp/__pdg__/dist/code/f3a7fa5082223a237075d32a47d96d7456d34f584189bd7b87c74cb52faa8534/node_modules/.pnpm/@aws-sdk+middleware-serde@3.290.0/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:5:26)

Strange, I can reproduce in the Pipedream UI, but locally there is no problem

I think I figured it out. It happens with the latest version of the aws npm packages. Just confirming a few thing before concluding

Yep, the version pinned in the package.json works - 3.66.0
I’ll see what I can do to pin this version

Hi, ! Thank you for the quick diagnosis. Do you envision any workaround meanwhile?

Hi , sorry for the delay.
Seems like AWS fixed the issue and deployed a new version. Will publish an update for the action now

The action is now updated. Can you try again and check if it works?

Hey, . I don’t know if this is related, but now I am getting another error:

That’s not related, but definitely a bug. I’ll take a look at this soon

Taking a look at this now. Btw , just noticed your Zoom API token is in the screenshot. I suggest you revoke this API token and create another one

You mean this one?

Yep

This access token is specific for this video. They generate an access token for individual videos. The actual authentication is OAuth. And this particular video is a 10s test video from myself. So no harm in this case.

Thanks for alerting me, though!

We’ve submitted a fix for the error. Can you update the action and try again please?