I want to upload and download files using drag n drop between user computer and web browser. How can I do it ASP.NET/AJAX or JS/JQuery?
Using Vue 2 with Axios, you can upload files easily with a few clicks. Using the <input> tag and specifying the type to file, the browser will allow you to select the file to upload from your computer. Axios can POST FormData instances, which makes it easy to upload files.
The <input type="file"> defines a file-select field and a "Browse" button for file uploads. To define a file-select field that allows multiple files to be selected, add the multiple attribute. Tip: Always add the <label> tag for best accessibility practices!
In File Explorer, click any file or folder and hold the left button on your mouse. Then, press the Esc key. Now, try dragging and dropping again.
Use your mouse to long-press the files you've selected, and a thumbnail will appear. Drag the files to your desired location on your PC. The cursor will change to indicate when you're able to drop the selected files.
Take a look at plupload
Also see http://www.thebuzzmedia.com/html5-drag-and-drop-and-file-api-tutorial/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With