Coder Social home page Coder Social logo

Comments (9)

aoqfonseca avatar aoqfonseca commented on July 18, 2024

This happens because we use image path to construct S3 path. When you put the last slash, S3 consider this a folder then create an empty folder (w/o name). We'll check a way to manage this kind of issue.

Thanks.

from aws.

philipbjorge avatar philipbjorge commented on July 18, 2024

@aoqfonseca -- So we have extensionless image urls and need a fix for this.
Off the top of my head, it seems like doing a transformation like the following in _normalize_path...

https://xyz.cloudfront.net/i/372852/ to https://xyz.cloudfront.net/i/372852SLASH would work (or any sort of ending that we are relatively certain won't have collisions)

Can you think of any problem with that approach on our side? (We were going to fork the repo temporarily as a workaround and I could polish things up for upstream if you think that's a reasonable fix)

from aws.

aoqfonseca avatar aoqfonseca commented on July 18, 2024

No problem with this approach. I would rather to use something more meaningful, like: https://xyz.cloudfront.net/i/372852/image.png or https://xyz.cloudfront.net/i/372852.png .

from aws.

philipbjorge avatar philipbjorge commented on July 18, 2024

@aoqfonseca -- The problem with appending the extension is that I don't think we know what file type an image is at _normalize_path -- I went with the following approach...

https://github.com/Leafly-com/aws/pull/1/files

@Bladrak -- If this seems solid, I'll write tests and send out a PR.

from aws.

Bladrak avatar Bladrak commented on July 18, 2024

Seems fine @philipbjorge, however I would rename no_extension to root_image (without the type as the extension). Also, this name may rather be in the config, so it can be changed by the use if need be.

from aws.

Bladrak avatar Bladrak commented on July 18, 2024

@philipbjorge What's the status on this? Do you feel ready to submit a PR to this repo?

from aws.

philipbjorge avatar philipbjorge commented on July 18, 2024

@Bladrak -- Heh, I'd forgotten about this.
I will try to get to this within 7 days, but if I haven't submitted a PR for this by then anyone should feel free to pick this up :).

It's a straight forward feature to add and would be great for new contributors to open source.

from aws.

Bladrak avatar Bladrak commented on July 18, 2024

Great, thanks for your feedback :)

from aws.

Bladrak avatar Bladrak commented on July 18, 2024

Should be resolved with 6.2.3 version using TC_AWS_ROOT_IMAGE_NAME option.

from aws.

Related Issues (20)

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.