0

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!

0

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.