使用文件系统API将本地驱动器上的文件上传到本地文件系统的HTML中
To upload from local drive to the local file system, we can use −
- Webkitdirectory attribute on c946df2939eb19165ad3e15299f6f1f8 − This allows the user to select a directory by the appropriate dialog box.
- Filesystem API is a sandboxed filesystem, which allows us to store files on client’s machine.
- File API allows us to read files. Files are accessible by c946df2939eb19165ad3e15299f6f1f8 element
All of the above is working fine in Google Chrome.
WebKit directory is a much better option among these. Use the following for directory −
webkitRequestFileSystem(
window.TEMPORARY, 5 * 1024 * 1024, function(_fs) {
fs = _fs;
},
Err
上面,err和fs是−
var fs,
err = function(err) {
throw err;
};
以上就是使用文件系统API将本地驱动器上的文件上传到本地文件系统的HTML中的详细内容,更多请关注双恒网络其它相关文章!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。



