Programmatically set name of file to upload in webpage

折月煮酒 提交于 2019-12-01 12:42:05

There is no way to programatically grab files from a user's computer via the browser. This would be a security violation if a website could just grab things.

No, you cannot do this without a client-side application or special plug-in.

Browser security doesn't allow the server to obtain information about the hard drive contents of the client.

You may be able to do this using some form of browser plug-in. This is more work for you (and there are potential security implications for this beyond those found when you just have users run your app). However, it may prevent a more integrated experience for your users. I'd hesitate to eliminate the application completely, though. Browser compatibility issues are common.

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