# Attachment\_fu + S3 - re-save problem

**URL:** <https://www.ruby-forum.com/t/attachment-fu-s3-re-save-problem/91395>\
**Category:** Rails\
**Created:** [April 8, 2007, 7:40am UTC](https://www.ruby-forum.com/t/attachment-fu-s3-re-save-problem/91395 "2007-04-08T07:40:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sness](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@sness](https://www.ruby-forum.com/u/sness)\
**Post date:** [April 8, 2007, 7:40am UTC](https://www.ruby-forum.com/t/attachment-fu-s3-re-save-problem/91395/1 "2007-04-08T07:40:58Z")

</div>

Hi,

I’m using attachment\_fu with S3 storage, and am running into a problem:

When I first save the image to S3, it gets uploaded fine. When I try  
to change the image with:

```
  @image = Image.find_by_id(params[:id]) || Image.new
  @image.attributes = params[:image]
  if @image.save
     ....
  end

```

The filename in the database gets updated, the filenames change to the  
new name in S3, but the images on S3 are of the original image, not  
the updated image.

yours,  
Steven.

---

<div class="post-metadata">

**Author:** ![sness](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@sness](https://www.ruby-forum.com/u/sness)\
**Post date:** [April 8, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/attachment-fu-s3-re-save-problem/91395/2 "2007-04-08T18:52:41Z")

</div>

Hi,

I’ve been working on tracking this down, and I have another data  
point: This was with the MiniMagick engine. When I switched to  
Rmagick, the new image gets uploaded correctly to S3.

yours,  
sness.
