none
[Java][Azure Storage] File Name Encoding Issue RRS feed

  • Question

  • I created a blob with following blob name: 

    Dummy data export (   %      .+,@$#=`~^{}) 14 June 2015 - 28 June 2015.zip

    I tried to store it in two ways:

    1. without encoding it in my code and use the encoded name to access.


    Dummy%20data%20export%20(%20%20%20%25%20%20%20%20%20%20.+,@$%23=%60~%5E%7B%7D)%2014%20June%202015%20-%2028%20June%202015.zip

    Not able to access the blob.

    2. If I encode the name in my code, then sdk encodes it again hence result in double encoding which I don't want.

    Can you please help in fixing this issue?

    I am using azure java sdk 2.2.0

    Thanks



    Tuesday, August 11, 2015 10:17 AM

Answers

  • Hi,

    I have tried to upload the zip file with the same name as yours, after upload file to azure storage, I can access the blob with the name "Dummy data export (   %      .+,@$#=`~^{}) 14 June 2015 - 28 June 2015.zip", the Uri of this file is "http://<your account name>.blob.core.windows.net/<container name>/Dummy data export (   %25      .+,@$%23=`~^{}) 14 June 2015 - 28 June 2015.zip", please remember this url will be encoded by url encode, and the request url will change to "http://<your account name>.blob.core.windows.net/<container name>/Dummy%20data%20export%20(%20%20%20%25%20%20%20%20%20%20.+,@$%23=%60~%5E%7B%7D)%2014%20June%202015%20-%2028%20June%202015.zip", however it doesn't matter, the download file will has the same name as you define. if you couldn't access your uploaded file, please make sure your container is in public mode, as I know, the azure storage sdk will not encode the file name, the custom file name will let us know the file resource directory, I don't suggest you to encode the file name.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, August 12, 2015 2:17 AM
    Moderator

All replies

  • Hi,

    Thank you for reaching out to us.
    I am currently researching to gather more information with regards to your request.
    I shall revert back to you with an update at the earliest.
    Sincerely appreciate your patience.

    Regards,
    Shirisha Paderu

    Tuesday, August 11, 2015 4:44 PM
  • Hi,

    I have tried to upload the zip file with the same name as yours, after upload file to azure storage, I can access the blob with the name "Dummy data export (   %      .+,@$#=`~^{}) 14 June 2015 - 28 June 2015.zip", the Uri of this file is "http://<your account name>.blob.core.windows.net/<container name>/Dummy data export (   %25      .+,@$%23=`~^{}) 14 June 2015 - 28 June 2015.zip", please remember this url will be encoded by url encode, and the request url will change to "http://<your account name>.blob.core.windows.net/<container name>/Dummy%20data%20export%20(%20%20%20%25%20%20%20%20%20%20.+,@$%23=%60~%5E%7B%7D)%2014%20June%202015%20-%2028%20June%202015.zip", however it doesn't matter, the download file will has the same name as you define. if you couldn't access your uploaded file, please make sure your container is in public mode, as I know, the azure storage sdk will not encode the file name, the custom file name will let us know the file resource directory, I don't suggest you to encode the file name.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, August 12, 2015 2:17 AM
    Moderator