Using the NeatUpload file-upload control
Is there a way I can paste a file path (instead of browsing) into an InputFile
control?
Say I have the path on the clipboard and javascript sets focus to the control, and the user manually pastes the clipboard contents using ctrl+v
.
Right now, if I paste the clipboard, it doesn't seem to receive the file. That is, the textual path does not seem to get accepted into the control.
Now, I've found these thread:
Assign file path to FileUpload Control
and
How can I set path in the fileupload control on page load
, but I thought maybe since NeatUpload has such influence over the control that there was another way - say, if the user pasted the file-path into a text box, then I could have the file-path available to code-behind. Then, how would I get that path into the InputFile
control? I've read the NeatUpload docs and searched the forums, but I still need some advice or examples.
Is there a way to be able to receive a paste event into the InputFile control? Or, is there a way to get the path from a textbox into the upload sequence code?
Due to security reasons, there is no way to set any of the settings for this type of control.
However, a workaround is this:
Add a javascript (A simple $('InputFileID').click();
will do nicely) function that will click the Browse
button. This will open the file-browsing dialogue. Now the user can paste the clipboard right into the box in that dialogue.