Default folder and filename for html file upload

僤鯓⒐⒋嵵緔 提交于 2019-12-23 16:31:14

问题


I'm using a jQuery Ajax plugin to upload image files from a local machine to a webserver. The webpage presents a button marked Upload Image File, the user presses the button and selects the file to upload from a popup directory listing presented by the browser, PHP at the server stores the image file away, and all that works fine.

When the user views the webpage to upload the image, the file path of the image on the local computer is completely predictable. This is part of a workflow where the file names and folders are well-defined.

I understand that the file upload mechanism in the browser is deliberately not changeable, because that would be a security worry. But, is it possible to give it a hint, so it presents the popup directory listing with the correct file in the correct folder already selected, so the user just has to hit return to confirm the upload?

I looked at Set a default file name/directory for upload on web form by modifying the html but found nothing I could use. Is this hinting impossible?

来源:https://stackoverflow.com/questions/17471615/default-folder-and-filename-for-html-file-upload

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!