重命名用户上传javascript的文件 [英] rename file that user uploads javascript
本文介绍了重命名用户上传javascript的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在表单上有以下html:
I have the following html on a form:
<input type="file" name="uploadField" />
当用户单击浏览按钮时,他们可以选择任何文件,但是我想使用表单上另一个字段的值来重命名文件
When users click on the browse button they can select any file but I want to rename the file using the value of another field on the form
我有一个提交按钮.我可以在这里做吗?
I have a submit button. Can I do it here?
推荐答案
我可以在这里吗?
Can I do it here?
否,出于安全原因,您无法在客户端上对此进行控制.上传文件后,您可以在服务器上重命名该文件.
No, for security reasons you have no control of this on the client. You can rename the file on the server when it gets uploaded.
这篇关于重命名用户上传javascript的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文