Hi folks, - A customer wants to have a quick way to upload files in a rail time consulting situation. He captures images with a screen capture utility and wanted to upload them as quick as possible. - In Hobo you achieve that with an extra JS-Library called Fineuploader. It provides upload using drag and drop and pasting. - This is not Hobo only, but my approach (mis?)uses a lot Hobo features. All Code can be found in the Gist<https://gist.github.com/haslinger/8707582> . - Be aware, the library provided is GPLv3'ed, but you could buy a commercial License at Widen's site<http://fineuploader.com/purchase_form.html>. (I'm not affiliated with them in any way). - You can always compile the latest version of the library yourself, if you have some knowledge of NPM and Grunt, I leaned it in an hour. - Fineuploader, does not now about Rails, so I taught it about CSRF in conversation.dryml 20-22 and 35-37, otherwise my requests would not be authenficated. - You can name any HTML Element as a paste target using it's id (line 33). - I want the sales agent to provide a file name, so I prompt for it (line 34). - It calls a Hobo transition (this gives me authorization Hobo style), but via POST, so I need an extra route. - The params provided are not Paperclip style, so I help a little bit with the file name (btw. the same approach is useful, if you upload from the file system in a rake task). - Fineuploader wants a Json response (conversations_controller line 16) to be able to give a success message after upload. - Some things can be improved easily, like using the assets pipeline or error handling, but I'm lazy here and just wanted to share the principles :-)
Bye, Stefan -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
