Home  >  Article  >  Backend Development  >  javascript - html上传图片选择文件以后,未提交前,文件保存在哪里?

javascript - html上传图片选择文件以后,未提交前,文件保存在哪里?

WBOY
WBOYOriginal
2016-06-06 20:37:061682browse

html的input file控件,在选取一个文件后,提交之前,这个文件是放在哪里的?

我使用了一个控件显示:
javascript - html上传图片选择文件以后,未提交前,文件保存在哪里?

是在内存中,是在缓存中,还是都没在?

回复内容:

html的input file控件,在选取一个文件后,提交之前,这个文件是放在哪里的?

我使用了一个控件显示:
javascript - html上传图片选择文件以后,未提交前,文件保存在哪里?

是在内存中,是在缓存中,还是都没在?

你的控件是用了fileAPI吗?这个input file是两个东西。

file控件本身只是获取一下你要上传文件的路径,至于上传就属于浏览器操作了。所以说文件在你上传前还是放在磁盘上的,在你提交的时候,浏览器读一下然后扔到服务器上。

深入理解阅读下文
http://www.cs.tut.fi/~jkorpela/forms/file.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn