0

as it stands, I have an input field for someone to select a file to upload. It's filtered to only show one extension. That's fine. There's three files with the exact same filename (exception being the extension) that I want to upload

I only want the user to select the .txt file, but I want the other three uploaded as well.

example.txt, example.png, example.htc, example.gif

My current train of thought is to make three more upload fields, set them to display: none and use jquery to get the filename from the visible upload field. Is this a bad idea?

4

1 回答 1

0

As it turns out, browsers won't let this happen for security reasons. Let's say if you had a file with banking information in the same folder an uploaded image. It's a security issue since the user is unaware they have selected the file to be uploaded.

I ended up using plupload, shift + clicking isn't that big of a hassle for an end user.

于 2013-06-03T19:07:03.787 回答