이 글은 기술 검토가 필요합니다. 도울을 줄 수 있는 방법을 살펴보세요.
이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!
The DataTransfer.files
property is a list of the files
in the drag operation. If the operation includes no files, the list is empty.
This feature can be used to drag files from a user's desktop to the browser.
Syntax
dataTransfer.files;
Return value
A list
of the files in a drag operation, one list item for each file in the operation. If the drag operation had no files, the list is empty.
Example
There are two live examples of this interface:
- Firefox only: https://jsfiddle.net/9C2EF/
- All browsers: https://jsbin.com/hiqasek/
Specifications
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of 'files' in that specification. |
Living Standard | |
HTML5.1 The definition of 'files' in that specification. |
Working Draft | Initial definition |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 4 | 3.5 | 10 | 12 | 3.1 |
Feature | Android | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | Not supported | Not supported | Not supported | Not supported | Not supported | 10 | Not supported | Not supported |