Git Product home page Git Product logo

Comments (5)

janko avatar janko commented on May 22, 2024

This is a standard error when CORS isn't properly working. How long after setting up CORS does this still happen? From Shrine's "Direct Uploads to S3" guide:

Note that it may take some time for the CORS settings to be applied, due to DNS propagation.

from shrine.

flyingboy007 avatar flyingboy007 commented on May 22, 2024

tried after 3-4 hours still same..

from shrine.

janko avatar janko commented on May 22, 2024

Aha, I think I see now what's the problem, it looks like you've set the region to ap-southeast, but the region name should be either ap-southeast-1 or ap-southeast-2: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

from shrine.

flyingboy007 avatar flyingboy007 commented on May 22, 2024

Exactly mate..didnt even think that was the issue..was deleting and reconfiguring buckets whole day....This gem is great.. I think there are some issue like images left over in cache if we select multiple files..anyway need to look more into it and will report it as it comes.. Thanks a lot for making this awesome gem..

from shrine.

janko avatar janko commented on May 22, 2024

Awesome, I'm glad you like Shrine :)

Images being left in the cache is the expected behaviour. It wasn't like this prior to 1.0, cached files were automatically deleted when they are moved to store. However, that behaviour was causing several issues:

  • If moving plugin is used without processing, errors would be raised because the file would be deleted twice. I had a hack against that at the moment, but it was kind of ugly.
  • If the record is retrieved in the controller and the page starts being rendered, and in the meanwhile the attachments gets successfully promoted, the cached file could get deleted before the browser starts downloading the image, resulting in a broken image tag (fixed by refreshing the page). This probably wouldn't happen often, but when it happens it's not nice UX.
  • Automatically deleting promoted cached files could make users think that this will keep the cache clean. However, if you're using direct uploads, or even if you're not, the user (attacker) can still start filling up your cache if they wanted to. This is not a reason of course, just that in that case you would still need a mechanism of automatically deleting your cache.

from shrine.

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.