My Solution is : add category field in table at the time of uploading create a folder having name of category and store that image in the respective category
For ex: if you are uploading image belongs to school_pics category create a folder school_pics and store the respective images in that folder if params[:category].eql?('school_pics') blah blah else blah blah blah end On Thu, Mar 21, 2013 at 4:23 PM, Colin Law <clan...@googlemail.com> wrote: > On 21 March 2013 10:38, avinash behera <aavinash.beh...@gmail.com> wrote: > > Can anyone help me on this ? > > You still have not really explained the problem. Start with just one > problem that you want to solve. Don't ask a general question, > describe exactly what you want to do and what the problem is. > Remember, start with just the first thing you are having a problem > with. Once that is sorted you can move on to the next problem. > > Colin > > > > > > > On Wed, Mar 20, 2013 at 6:34 PM, avinash behera < > aavinash.beh...@gmail.com> > > wrote: > >> > >> Upload is fine. > >> Suppose I am uploading five images, which I can do with file upload. > >> But I also need to upload those images to a specific category. I also > need > >> to save Image name and which category(dropdown) it belongs into the db. > >> > >> Suppose I uploaded 2 images:- > >> After clicking on submit, I will get :- > >> > >> Image , Image Name : Text(We have to input), Category : Dropdown > >> ---- It will repeat > >> > >> > >> On Wed, Mar 20, 2013 at 2:32 PM, Colin Law <clan...@googlemail.com> > wrote: > >>> > >>> On 20 March 2013 05:08, Avi <aavinash.beh...@gmail.com> wrote: > >>> > Hello All, > >>> > > >>> > I have a requirement. > >>> > I am uploading multiple images from a folder. > >>> > After Submit, it should show all the images row-wise in the UI in the > >>> > same > >>> > page as :- > >>> > Image Name : name.png > >>> > Image Name : hello.png etc..... > >>> > >>> Which bit don't you know how to do? Upload? Redirect to the correct > >>> view after upload? Fetch names from db in controller action? View > >>> the names? > >>> > >>> We are not telepathic, you must ask specific questions not just ask us > >>> how to write your application. > >>> > >>> Colin > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > Groups > >>> "Ruby on Rails: Talk" group. > >>> To unsubscribe from this group and stop receiving emails from it, send > an > >>> email to rubyonrails-talk+unsubscr...@googlegroups.com. > >>> To post to this group, send email to rubyonrails-talk@googlegroups.com > . > >>> For more options, visit https://groups.google.com/groups/opt_out. > >>> > >>> > >> > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to rubyonrails-talk+unsubscr...@googlegroups.com. > > To post to this group, send email to rubyonrails-talk@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.