Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

File

BaselineWidely available

Note: This feature is available inWeb Workers.

TheFile interface provides information about files and allows JavaScript in a web page to access their content.

File objects are generally retrieved from aFileList object returned as a result of a user selecting files using the<input> element, or from a drag and drop operation'sDataTransfer object.

AFile object is a specific kind ofBlob, and can be used in any context that a Blob can. In particular, the following APIs accept bothBlobs andFile objects:

SeeUsing files from web applications for more information and examples.

Blob File

Constructor

File()

Returns a newly constructedFile.

Instance properties

TheFile interface also inherits properties from theBlob interface.

File.lastModifiedRead only

Returns the last modified time of the file, in millisecond since the UNIX epoch (January 1st, 1970 at Midnight).

File.lastModifiedDateDeprecatedRead onlyNon-standard

Returns the last modifiedDate of the file referenced by theFile object.

File.nameRead only

Returns the name of the file referenced by theFile object.

File.webkitRelativePathRead only

Returns the path the URL of theFile is relative to.

Instance methods

TheFile interface also inherits methods from theBlob interface.

Specifications

Specification
File API
# file-section

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp