# Change from attachment\_fu db BLOB to Paperclip S3

**URL:** <https://www.ruby-forum.com/t/change-from-attachment-fu-db-blob-to-paperclip-s3/186295>\
**Category:** Rails\
**Created:** [April 3, 2010, 11:03pm UTC](https://www.ruby-forum.com/t/change-from-attachment-fu-db-blob-to-paperclip-s3/186295 "2010-04-03T23:03:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 3, 2010, 11:03pm UTC](https://www.ruby-forum.com/t/change-from-attachment-fu-db-blob-to-paperclip-s3/186295/1 "2010-04-03T23:03:50Z")

</div>

Hi:

I have moved from using attachment\_fu with files stored in the DB to  
Paperclip using S3. The trick now is to migrate the files from the DB  
to S3.

I have tried a few methods like:

SThreeFile.create(:file =\> AttachmentFuFile.first.data)

and

@attachment = AttachmentFuFile.first  
SThreeFile.create(:file =\> ActionController::Streaming.send\_data  
@attachment.data, :filename =\> @attachment.name, :type =\>  
@attachment.content\_type)

The first gives lots of output to the console but doesn’t produce and  
results. The second gives:  
NoMethodError: undefined method `send\_data’ for  
ActionController::Streaming:Module

Can anyone point me in the right direction?

Thanks!
