Last Updated: February 25, 2016
·
1.402K
· raysrashmi

upload file through drag-drop

include following js
//= require jquery.remotipart
//= require jquery.ui.widget
//= require jquery.iframe-transport
//= require jquery.fileupload
//= require jquery.fileupload-ui
//= require jquery.fileupload-fp

in js write the following

$('.user_window').fileupload({
dataType: 'json',
url: url
})

here user_window is a class of html element where you want to drop the file from a dir or somewhere else

url is the path where you want to send your request

you can find deep detail here

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

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside