Home > database >  HTML input="file" accept only from certain paths
HTML input="file" accept only from certain paths

Time:03-01

I have a web page that allow to upload a file via the basic <input type=file /> I know that with javascript there's no way to get the full path after selection but .. is there a way to ACCEPT files only from certain paths, as I do with extensions (*.jpg, etc)?

Thanks in advance

CodePudding user response:

No. And even if there was, how would you specify those paths for Windows/Mac/Linux systems. What about network attached volumes? You can only "suggest" mime-types/extensions and the file dialog is 100% up to the user.

CodePudding user response:

No. That is not a feature that browsers provide.

Nor would it be one that makes much sense in the context of the WWW as local file paths are custom to different systems.

  • Related