1

I am having some trouble figuring out how to upload multiple images using a single form in a view. Basically, I have a form for articles on a blog that consists of a title text_field, a body text_area and a file_field for uploading a single picture using Paperclip and S3, which is all working fine.

However, I want to add more file_fields to the same form for uploading several different images, because each article needs to have more than one picture.

I've been searching for the last three days and reading through some tutorials that seemed relevant, but usually just suggested using 'html: { multipart: true }' at the start of the form or on the file_field itself, but this just gave different versions of the same image, such as :medium, :thumb, :avatar. But I think I may not have been asking the question clearly enough...

Does anyone know how to achieve this functionality? If you can point me in the right direction or have any links that will help me to achieve this I will be so grateful that I will get down on my knees and hail you as a coding prophet.

Thank you all very much in advance.

Let me know if I haven't been clear enough... and thanks again.

1 Answer 1

0

use gem ´carrierwave´

It works as a charm!

Here's a nice tutorial to do so.

enjoy

http://railscasts.com/episodes/253-carrierwave-file-uploads

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

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.