GithubHelp home page GithubHelp logo

Folder slash not correctly shown about s3-signed-url HOT 10 CLOSED

 avatar commented on August 19, 2024
Folder slash not correctly shown

from s3-signed-url.

Comments (10)

rbrigham avatar rbrigham commented on August 19, 2024

The forward slash is URL encoded to %2F. That should work in a browser or other HTTP clients. Let me know if there's a particular client that the URL wont work in.

from s3-signed-url.

 avatar commented on August 19, 2024

For example, it does not work on Google Chrome.

from s3-signed-url.

 avatar commented on August 19, 2024

Well, the request work, but that is wrong request, as the name of object has been changed, right? The object is not any more /new/tgbai.txt but it is new%252Ftgbai.txt so it cannot be the same.

from s3-signed-url.

rbrigham avatar rbrigham commented on August 19, 2024

While it looks different on the surface, both represent the same URL. There's a wiki article on URL encoding at http://en.wikipedia.org/wiki/Percent-encoding that can provide more background. Special characters are often encoded because they can cause confusion to other parsing systems when they use the same characters as delimiters.

from s3-signed-url.

 avatar commented on August 19, 2024

Why don't you try it out yourself on the URL you just gave me:
http://en.wikipedia.org/wiki/Percent-encoding is simply not the same as:
http://en.wikipedia.org/wiki%2FPercent-encoding

My question is not how it should be, I would like to know, if you can repair this script that it gives correct URLs. As otherwise signed URLs, do not give the objects! They are not accessible, provided the object is in the folder. So, something is wrong.

from s3-signed-url.

 avatar commented on August 19, 2024

I see, signed URL gives the object on Amazon directly, but if I use VANITY, on my bucket, it does not. Maybe it is my mistake with my permissions. Still, it would be nice, if you have clear URLs in this script with slash instead with %2F -- I understand about URL encoding, but can that be an option in the script? Instead of forcing it?

from s3-signed-url.

rbrigham avatar rbrigham commented on August 19, 2024

Nope not your mistake. It seems there's a problem in the underlying Perl module I'm using to generate the signed URLs when you use the vanity format. I'm investigating a little further to see if there's a workaround/fix.

from s3-signed-url.

rbrigham avatar rbrigham commented on August 19, 2024

It looks like the encoded path in the URL will work with the VANITY format, at least in my testing. It would look better with the unencoded slash though. I'll reopen to track as a feature request, but I haven't touched this project in a while. I'm very open to pull requests though. :)

from s3-signed-url.

rbrigham avatar rbrigham commented on August 19, 2024

I added a --no-encode switch to disable escaping the object key if desired.

from s3-signed-url.

 avatar commented on August 19, 2024

Thanks!

from s3-signed-url.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.