# SWF multiple file upload

**URL:** <https://www.ruby-forum.com/t/swf-multiple-file-upload/174529>\
**Category:** Rails\
**Created:** [August 28, 2009, 9:02am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529 "2009-08-28T09:02:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 9:02am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/1 "2009-08-28T09:02:32Z")

</div>

Hi guys

Im new to rails i would like to create app with swf file upload with  
multiple file upload,  
is that any sample app is available with multiple file uploads plz  
give me some reference for me

Ur’s  
Mahesh

---

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 9:34am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/2 "2009-08-28T09:34:41Z")

</div>

mahesh wrote:

> Hi guys
> 
> Im new to rails i would like to create app with swf file upload with  
> multiple file upload,  
> is that any sample app is available with multiple file uploads plz  
> give me some reference for me
> 
> Ur’s  
> Mahesh

Use Acts\_As\_Attachment plugin

[http://www.flex888.com/122/multiple-file-upload-with-ruby-on-rails-acts\_as\_attachment.html](http://www.flex888.com/122/multiple-file-upload-with-ruby-on-rails-acts_as_attachment.html)

---

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 10:23am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/3 "2009-08-28T10:23:19Z")

</div>

> **[GitHub - jimneath/swfupload---paperclip-example-app: An example application...](https://github.com/JimNeath/swfupload---paperclip-example-app/)**
>
> An example application that shows how to get Paperclip and SWFUpload playing together nicely. - GitHub - jimneath/swfupload---paperclip-example-app: An example application that shows how to get Pap...

git://github.com/cameronyule/yui-uploader-rails-authentication.git

---

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 10:38am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/4 "2009-08-28T10:38:33Z")

</div>

On 28 Aug 2009, at 08:25, mahesh wrote:

> Im new to rails i would like to create app with swf file upload with  
> multiple file upload,  
> is that any sample app is available with multiple file uploads plz  
> give me some reference for me

[http://www.google.com/search?client=safari&rls=en&q=paperclip+swfupload&ie=UTF-8&oe=UTF-8](http://www.google.com/search?client=safari&rls=en&q=paperclip+swfupload&ie=UTF-8&oe=UTF-8)

---

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 11:04am UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/5 "2009-08-28T11:04:19Z")

</div>

On 28 Aug 2009, at 09:34, Nik C. wrote:

> [http://www.flex888.com/122/multiple-file-upload-with-ruby-on-rails-acts\_as\_attachment.html](http://www.flex888.com/122/multiple-file-upload-with-ruby-on-rails-acts_as_attachment.html)  
> Acts\_as\_attachment has been replaced a long time ago with  
> attachment\_fu, this post dates from two years ago. But indeed, you  
> could use attachment\_fu instead of paperclip, that’s personal  
> preference. Paperclip does have a few advantages over attachment\_fu if  
> you need custom processing though (video thumbnailing etc). Not that  
> it can’t be done with attachment\_fu, but I can’t help it feeling a bit  
> hacky to say the least.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![mahesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Post date:** [August 28, 2009, 1:00pm UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529/6 "2009-08-28T13:00:48Z")

</div>

Thank you guys

i got the solution with help of ur reference, now im trying to view the  
file when im clicking the appropriate link i got the result when im try  
to  
show the image but i have a problem when im try in to some other file  
like  
pdf or doc .etc

in my controller i use the following code for show my file  
asset\_controller.rb  
def show  
puts params.inspect  
@asset = Asset.find(params[:id])  
@file\_path = ENV[“PWD”] +"/public/#{@asset.public\_filename}"  
content\_type = @asset.content\_type  
send\_file(@file\_path , :type =\> content\_type, :disposition =\>  
‘inline’)  
end

show html.erb

i use the following code to show the image:

\<%= image\_tag(@asset.public\_filename) %\>

what can i do for show the other file

Ur’s  
Mahesh

On Fri, Aug 28, 2009 at 1:37 PM, Peter De Berdt
