27-09-22 02:26 PM
Greetings,
I am using the last AWS S3 object from DXchange and all the prequisite objects as well are up to date.
I managed to use the main actions such as uploading, downlading and so. However, they only work if the object name has no space or special characters.
According to AWS documentation, this scenario needs a special handling. It makes complete sense to do so as it will be affecting the URL and it has to be encoded.
I am not good with custom codes, but I understood that there is no encoding happening. which leads to the problem I'm facing.
Is there any possibility to get any kind of help to modify the code to make it encode the special characters?
I've been trying to solve that issue for over than a week. I tried to build my own webservice action but I got stuck with AWS Signature.
Main goal is to download files which can be achieved by GetObject action.
I would appreciate any kind of help. Thanks in advance!
Answered! Go to Answer.
28-09-22 03:12 AM
27-09-22 06:52 PM
27-09-22 07:15 PM
Hi @ewilson,
Thank your taking the time to help!
By "object name" I meant the file that I need to download from S3. As you are probably I ware, I need to pass the bucket name and the key of the file that needs to be downloaded. The bucket has no special characters, the file names do.
Considering this example /Bucket-Name/FirstFolder/SecondFolder/File to download 10:20:30.pdf
I did try using the URL Encode action in the Utility - HTTP on FirstFolder/SecondFolder/File to download 10:20:30.pdf since it's the key for the object to be downloaded. However, this still did not work.
It also encoded the "/" which doesn't seea problem for the request either ways as I can download without issues if the name of the file as FileToDownload (with no special characters)
Do you think this is the correct approach to change only that or are you suggesting using it on the full AWSEndpoint?
I tried to use it on the full AWSEndpoint and I received an error when I passed it to the HTTP Request File action.
Looking forward for your answer.
27-09-22 07:56 PM
Encoded_URL = HttpUtility.UrlEncode( URL )
to this
Encoded_URL = HttpUtility.UrlPathEncode( URL )
This will encode the file name, but it will leave the "/" untouched.
27-09-22 08:21 PM
27-09-22 09:28 PM
27-09-22 09:36 PM
@ewilson,
Yes, this is an accurate description.
The error I receive is a 403 forbidden.
At first I thought it might be related to permissions but that was cleared out as I already can download other files using the same GetObject action. As well as I can download the those files with space using WinScp.
27-09-22 11:30 PM
28-09-22 03:12 AM
28-09-22 07:44 AM