I have an application where users will be able to upload multiple images for one Product (via something like Ryan Bates nested fields, so you'd click "Add Image", and a file upload would appear on the same page). I'm planning on using jQuery File Upload, and Amazon S3, and nested fields.
The thing I'm confused about, is how people usually associate many images with a single model.
For example, if for every Product, there can be many Images, how do I store the images to be associated with the Product?
I was thinking of having jQuery File Upload return the s3 url for each image. So if 10 images were uploaded, then 10 hidden fields were created for each image-url, which I then JSON serialize and store in the Product model?
But this doesn't seem like a pretty solution? What's a better method?