I am using Ruby on Rails 2.3.5
I want to let the user upload files, not only images, but also music files or just txt documents.
Could I use paperclip for this purpose (I will store those files in Amazon S3)? Is there any special things I have to note about?
Or if the paperclip gem could not handle them, what could I use?
Paperclip does all you asked. I also used to upload mp3 files with paperclip to rackspace cloud. Never had any sort of problems.
Related
I want to allow my user to download a bundle of files that are stored on s3 using the zipline gem. The files are already hosted on an s3 server but they aren't there as part of a paperclip or carrierwave attachment in my app. Will I need to create some records in my database to sort of trick zipline into thinking they are paperclip attachments, or is there a way I can send the zip file without bothering with an attachment gem? At the moment, trying to download the files with zipline doesn't throw an error message at all. It just seems to skip right over and nothing downloads.
See the part of the zipline README where an enumerator gets used to include remote files into the ZIP. It uses absolute URLs, to generate those from your S3 objects you will need to use presigned URLs (which Zipline is going to pass on to Curb):
Aws::S3::Bucket.new(your_bucket_name).object(your_key).presigned_url(:get)
I am creating a Rails app which should allow users to upload any type of audio file format. I am currently using Carrierwave gem to accomplish this, however CarrierWave will not allow uploads of certain file formats such as .band (GarageBand default format).
Is there a way to accomplish this?
Well, .band is actually a folder containing multiple files. So, yes, carrierwave does not allow uploads of folders. The folder must be converted into a .zip file.
I'm designing a little application using Rails and I need to upload files. I searched and I found paperclip + Carrierwave to do that. I've also seen that it's possible for that gems to specify where to store the uploaded file in the model.
My question is : Using Paperclip, is it possible to know at runtime where the user wants to upload the file and of course is it possible to catch and save the file to the corresponding host ?
Regards
I want to create a simple form for users to upload a file, which will be stored in a database. I also want to display all the submitted files in the database with their name and a link to download the file. Schematically, what's the best way to do this in Rails/how should I store the file in table (which fields should my table have? etc). Thanks!
i would use paperclip gem with the upload to s3 instead of file system
https://github.com/thoughtbot/paperclip
checkout the README, most of the examples are for an image, but works with non-image files as well
use paperclip to upload file, you can store images/file in your database as well as in s3 (AWS)
See below link how to use paperclip in rails with example
Here is the steps how to upload file using paperclip in rails
http://patshaughnessy.net/2009/4/30/paperclip-sample-app
for github
https://github.com/thoughtbot/paperclip
https://github.com/websymphony/Rails3-Paperclip-Uploadify
I have Ruby on Rails app and I use Carrierwave for uploading my images, but I need upload more than one image at a time. I find some jQuery plugins(uploadify, image-uplad) but I don't know how implement it to my app. I don't need a huge app/engine for it.
Check it : http://lucapette.com/rails/multiple-files-upload-with-carrierwave-and-nested_form/
Uploading multiple files at once to Rails app with Carrierwave (HTML5)