GithubHelp home page GithubHelp logo

Comments (8)

luccasmaso avatar luccasmaso commented on August 30, 2024

someone?

from carrierwave_direct.

colinyoung avatar colinyoung commented on August 30, 2024

No, the attachment definitely is deleted from S3 under normal conditions. I know this is probably too late to matter, but can you please give us a code sample of your model file, or describe what was happening?

from carrierwave_direct.

colinyoung avatar colinyoung commented on August 30, 2024

Hey @dwilkie, I'm seeing this happen now, too. Calling uploader.file.delete will delete just one version.

I know this is supposed to be automatic as part of carrierwave and/or fog -- it's not on our side. Any ideas why this might be happening?

from carrierwave_direct.

colinyoung avatar colinyoung commented on August 30, 2024

For now, @luccasmaso, you can add the following to your model:

around_destroy { attachment.remove! }

Where attachment is your mounted uploader.

from carrierwave_direct.

atthaboon avatar atthaboon commented on August 30, 2024

Hi @colinyoung i already add
around_destroy { image.remove! }
but not work
My model
class ItemGallery < ActiveRecord::Base
attr_accessible :image
mount_uploader :image, ImageUploader

around_destroy { image.remove! }

end

from carrierwave_direct.

colinyoung avatar colinyoung commented on August 30, 2024

In the past this has failed for me due to a lack of Internet connection, for example developing on a plane. If that's not it, would you mind posting your other after_ and before_ filter code?

from carrierwave_direct.

atthaboon avatar atthaboon commented on August 30, 2024

Thanks a lot. I can fixed by adding
before_destroy :delete_images
private
def delete_images
self.remove_image!
end

from carrierwave_direct.

nddeluca avatar nddeluca commented on August 30, 2024

Looks to be resolved. Closing for now - will reopen if it becomes apparent that this is still ongoing.

from carrierwave_direct.

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.