Myth17
2012-Mar-04 06:42 UTC
How to retrieve a FileBlob from ''ActionDispatch::Http::UploadedFile'' instance?
I have used ''remotipart'' gem to upload files asynchronously to server side. The instance passed to the server side is of ''UploadedFile'' . The Rails API mentions all the methods( like read(), open() ) and attributes for the class, however I am not sure how to retrieve the File and store it on the database. The documentation hardly says anything. Googling took me to no tutorials using this class. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/j7gEPOO7fjsJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
arturturik
2012-Mar-04 09:12 UTC
Re: How to retrieve a FileBlob from ''ActionDispatch::Http::UploadedFile'' instance?
You should start looking at http://api.rubyonrails.org. Just type "http://api.rubyonrails.org/" into search box. On Mar 4, 8:42 am, Myth17 <nitishupr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have used ''remotipart'' gem to upload files asynchronously to server side. > The instance passed to the server side is of ''UploadedFile'' . > > The Rails API mentions all the methods( like read(), open() ) and > attributes for the class, however I am not sure how to retrieve the File > and store it on the database. The documentation hardly says anything. > > Googling took me to no tutorials using this class.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Myth17
2012-Mar-04 16:52 UTC
Re: How to retrieve a FileBlob from ''ActionDispatch::Http::UploadedFile'' instance?
As I have already mentioned in my previous post, I looked up the API and found the Class, however there are no documents as to how to use the functions. On Sunday, March 4, 2012 2:42:05 PM UTC+5:30, arturturik wrote:> > You should start looking at http://api.rubyonrails.org. Just type > "http://api.rubyonrails.org/" into search box. > > On Mar 4, 8:42 am, Myth17 <nitishupr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have used ''remotipart'' gem to upload files asynchronously to server > side. > > The instance passed to the server side is of ''UploadedFile'' . > > > > The Rails API mentions all the methods( like read(), open() ) and > > attributes for the class, however I am not sure how to retrieve the File > > and store it on the database. The documentation hardly says anything. > > > > Googling took me to no tutorials using this class.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/LormIuosTTkJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Mar-04 17:11 UTC
Re: How to retrieve a FileBlob from ''ActionDispatch::Http::UploadedFile'' instance?
On 4 March 2012 06:42, Myth17 <nitishupreti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have used ''remotipart'' gem to upload files asynchronously to server side. > The instance passed to the server side is of ''UploadedFile'' . > > The Rails API mentions all the methods( like read(), open() ) and attributes > for the class, however I am not sure how to retrieve the File and store it > on the database. The documentation hardly says anything. > > Googling took me to no tutorials using this class.I have not used it but from the home page [1] there are links to demo apps, do they not help? [1] http://os.alfajango.com/remotipart/ Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Myth17
2012-Mar-04 17:33 UTC
Re: How to retrieve a FileBlob from ''ActionDispatch::Http::UploadedFile'' instance?
I have read it, however it does not talk about how to store the fileblob server side. The Upload is working successfully, I am just clueless on how to handle the instance server side. On Sunday, March 4, 2012 10:41:15 PM UTC+5:30, Colin Law wrote:> > On 4 March 2012 06:42, Myth17 <nitishupreti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have used ''remotipart'' gem to upload files asynchronously to server > side. > > The instance passed to the server side is of ''UploadedFile'' . > > > > The Rails API mentions all the methods( like read(), open() ) and > attributes > > for the class, however I am not sure how to retrieve the File and store > it > > on the database. The documentation hardly says anything. > > > > Googling took me to no tutorials using this class. > > I have not used it but from the home page [1] there are links to demo > apps, do they not help? > > [1] http://os.alfajango.com/remotipart/ > > Colin > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/DNw44WN_TQkJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Possibly Parallel Threads
- Should to_io be added to ActionDispatch::Http::UploadedFile?
- 3.1rc8 - posting files in a test no longer works
- A file-upload suddenly seems to be nil
- Cannot get multipart => true , running well in my form when using remote => true
- ActiveRecord::Base.transaction - SystemStackError - stack level too deep: