When perform uploading from IE browser, that my backend(org.apache.commons.fileupload) gets full file path.
For other non-IE browsers it gets filename and it's OK because of security.
How to get filename only from input for IE?
Is it possible to do on UI, because I think it's not very graceful to edit apache lib.
Maybe , some parameter exists for input field?
I can do it on server, but interested in UI approach.
Paths include the root, the filename, or both. That is, paths can be formed by adding either the root, filename, or both, to a directory.
Click the Start button and then click Computer, click to open the location of the desired file, hold down the Shift key and right-click the file. Copy As Path: Click this option to paste the full file path into a document. Properties: Click this option to immediately view the full file path (location).
A path may contain the drive name, directory name(s) and the filename. To extract filename from the file, we use “GetFileName()” method of “Path” class. This method is used to get the file name and extension of the specified path string. The returned value is null if the file path is null.
var fullPath = $('#fileUpload1'). val();
There is also an IE option under:
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