Hello rail users,
I’ve now been surfing the web to see how the trend is in doing file
uploading in rails. So far not much progress. Apart from the form setup,
the methods seem as many as there are people writing about them.
My needs are pretty simple I think, but being new to rails I’m having
some difficulties about how to put them to practise in the best way
inside the rails framework. My preferred method with doing file uploads
is having a special folder where the files go to, maybe some splitting
depending on the mime type. Then having all the files info in the
database, such as mime type, filesize, path, filename etc.
Now this is where I’m at right now. Ok not making it long lets just say
I’ve generated the model and connected it to some other models in my db.
What are your preferred ways in completing this task and first and
foremost my main question concerning almost all my rails questions. How
much code do I have to do, not that I’m unusually lazy just my
experience and problems related to rails so far have been down this
road. I spend some time doing something just to find out 1 day later
that there is a helper for this. To sum up, again how would you
implement these needs the “rails” way and how extensive is the file
uploading support in rails.
Regards,
-Andri Mar Jónsson