How to POST files from HTML5 Drag-Drop to a Rails 3 App & Paperclip?

后端 未结 2 1234
清歌不尽
清歌不尽 2021-01-30 14:54

I\'m trying to get some html5 drag-and-drop functionality in a Rails 3 app with Paperclip. So, basically:

  1. One or more files are dragged and dropped onto a DIV
2条回答
  •  孤城傲影
    2021-01-30 15:20

    Have a look at

    https://github.com/blueimp/jQuery-File-Upload/wiki

    and scroll down to Ruby (on Rails). That probably is exactly what you are looking for, including a tutorial on how to use it with Rails 3 and paperclip. And from my own experiences it works like a charm.

    And as Joost commented: https://github.com/yortz/carrierwave_jquery_file_upload shows a nice example of how to combine carrierwave with jquery_file_upload

提交回复
热议问题