AnthonyMDev / AmazonS3RequestManager

A request manager that uses Alamofire to serialize requests to the AWS S3 (Amazon Simple Storage Solution). Based on AFAmazonS3Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do amazonS3Manager.upload() function replace '+' character to white space character?

Laeyoung opened this issue · comments

I tried to upload using amazonS3Manager.upload() like above code.
amazonS3Manager.upload(from: fileUrl, to: "sample+0.mp4")
But uploaded file name in s3 was "sample 0.mp4".

Can you fix this issue or give me some advise for me?

Hi there @Laeyoung.

According the the S3 API Documentation:

The following character sets are generally safe for use in key names:

Alphanumeric characters [0-9a-zA-Z]
Special characters !, -, _, ., *, ', (, and )

The "+" character is listed under "Characters That Might Require Special Handling".
I would recommend you try not to use this character in your file names. If you absolutely need to use it, try manually percent escaping the character before passing your path to the upload(from:to:) function.

I don't really think that we should try to add support to this library for handling of these special characters, because the behavior of handling them by S3 is undefined and they are not recommended.

Thank you for fast response