Home >Web Front-end >H5 Tutorial >Detailed introduction to FileAPI
In HTML5, an API for file operations is provided. Through this API, the related processing of accessing the local file system from the web page becomes very simple. So far only some browsers support it. 1. FileList object and File object The FileList object represents a list of files selected by the user. In HTML4, only one file is allowed to be placed in the file control, but in HTML5, multiple files are allowed to be placed in the file control by adding the multiple attribute. Each file selected by the user in the control is a file object, and FileList is a list of these file objects, representing all the files selected by the user. The file object has two attributes, one is name, which means the file name does not include the path of the file; the other is lastModifiedDate, which means the date the file was last modified.
&1. HTML5 FileAPI graphic and text code sharing
# #Introduction: In HTML5, an API for file operations is provided. Through this API, the related processing of accessing the local file system from the web page becomes very simple. So far only some browsers support it.
2. jQuery plug-in jcrop+Fileapi perfectly realizes image uploading + cropping + preview code sharing_jquery
Introduction: This article mainly introduces the jQuery plug-in jcrop+Fileapi to perfectly implement the code of image uploading + cropping + preview. It is very simple and practical, and the effect is great. Friends in need can refer to it.
3. Angular Js file upload form-data_javascript skills
Introduction: angular-file-upload is a A lightweight AngularJS directive for file upload based on HTML5 technology. When the browser does not support it, it is implemented using FileAPI polyfill technology (based on Flash). This article mainly introduces form-data for Angular Js file upload. Friends who need it can refer to
[Related Q&A recommendations]:
How to upload large files using html5's FileApi?
javascript - What is the reason for the automatic rotation of web photo images in ios?
javascript - Does anyone know why I have this? The files uploaded are always 1?
The above is the detailed content of Detailed introduction to FileAPI. For more information, please follow other related articles on the PHP Chinese website!