1

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?

1
  • 2
    It is a serious security issue, no matter what you want to use. Only if you have some addon to the browser, otherwise any 'bad' site will be able to get anything from your computer on visit. Commented Feb 15, 2012 at 7:29

1 Answer 1

2

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 file input 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.