Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Multiple File fields of different types on the same model/form
2 Posts
Multiple File fields of different types on the same model/form

I've a form with the following fields: Product Name (text field) Product Image (file field) Product PDF (file field)

Now, I've a requirement that should add one more XML file to this same Product Model

Product XML (file field)

And I'm stuck here. Googled for "rails multiple file uploads of different mime-types" but always found the result like multiple files for the Model of the same type.

One solution would be to add the File upload functionality to separate Model and form, but my client needs it in the same form. Anybody, plz, show me the directions or has this been already accomplished using Paperclip??

2 Posts
Login to add your message