• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web 开发技术
  2. Web API 接口参考
  3. File
  4. File.size
  • Change language
  • View in English

Table of contents

  • 概述
  • 语法
  • 值
  • 规范
  • 另请参见

File.size

概述

以字节为单位返回文件的大小。

语法

var size = instanceOfFile.size

值

一个数

规范

不属于任何规范。

另请参见

  • Blob.size

 

Last modified: Mar 18, 2019, by MDN contributors

Change your language

Related Topics

  1. File
  2. Constructor
    1. File()
  3. 属性
    1. This API has not been standardized. This is an obsolete API and is no longer guaranteed to work. fileName
    2. This API has not been standardized. This is an obsolete API and is no longer guaranteed to work. fileSize
    3. lastModified
    4. This deprecated API should no longer be used, but will probably still work. lastModifiedDate
    5. This API has not been standardized. mozFullPath
    6. name
    7. type
    8. This API has not been standardized. webkitRelativePath
  4. 方法
    1. This API has not been standardized. This is an obsolete API and is no longer guaranteed to work. getAsBinary()
    2. This API has not been standardized. This is an obsolete API and is no longer guaranteed to work. getAsDataURL()
    3. This API has not been standardized. This is an obsolete API and is no longer guaranteed to work. getAsText()
  5. 继承
    1. Blob
  6. Related pages for File API
    1. Blob
    2. FileList
    3. FileReader
    4. FileReaderSync
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies