How can I imitate a drag-and-drop without the user actually dragging and dropping?
I’m building a simple in-house application for our team to upload files, but I don’t want them to drag and drop files to the page.
I simply want them to specify the local filename, and I need Javascript to tell the browser that file was dragged and dropped.
Also, after reading in many forums I’ve noticed that it’s near impossible to manipulate input type=”file” with javascript (for security issues).. my question would be, is it possible to do it with flash or any other technologies?
In the browser you operate in a walled garden – the browser doesn’t want you to have any access to the users machine to go and look around for files.
You will really need to accept that either the
fileinput or the drag and drop are the standard ways of selecting files for upload and working in the same way as other web pages is no bad thing as your users will be familiar with how it works.