如何在不选择文件的情况下上传文件?
如何在不浏览文件的情况下上传文件?因为我知道该文件在哪里,所以我不想浏览它。我正在尝试下面的代码,但它不起作用。
<form id="fupload" method="post" enctype="multipart/form-data">
<input type="file" name="f" value="D:\\test.docx" />
<input type="submit" name="submit" />
</form>
属性“值”似乎不适用于“输入文件”控件。然后我尝试使用“src”属性,但仍然相同。我想知道我们怎样才能做到这一点?是否可以通过提供特定文件位置来上传文件?
How to upload a file without browsing the file? because I know where the file is, so i don't want to browse to it. I was trying the code below, but it didn't work.
<form id="fupload" method="post" enctype="multipart/form-data">
<input type="file" name="f" value="D:\\test.docx" />
<input type="submit" name="submit" />
</form>
The attribute "value" seems didn't work with "input file" control. Then i tried with "src" attribute, but still the same. I wonder how can we do that? is it possible to upload a file by providing a specific file location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,
这将是一个难以理解的大安全漏洞。
No
That would be an incomprehensibly large security hole.