Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Special characters is S3 key name of uploaded file

Background

I'm using aws-android-sdk to send files from Android app to S3. The filename contains specials character such as =.

To do that, I use TransferUtility.upload(...) as explained in this guide.

The problem

When passing a key containing special characters such as =, the key is being URL encoded.

For example, the key:

year=2018/month=1/versions=1,2/my_file.txt

Becomes:

year%253D2018/month%253D1/versions%253D1%252C2/my_file.txt

My question

How can I upload an S3 file from my Android application, while using special characters in it's key?

like image 912
Michael Avatar asked Oct 16 '25 17:10

Michael


1 Answers

If you are partitioning your data on S3, it's a common practice to use = sign in the S3 key. Also interesting to note that the AWS SDK for iOS does not automatically encode the S3 keys.

like image 124
Ashot Tonoyan Avatar answered Oct 18 '25 08:10

Ashot Tonoyan