---
title: "File handling"
version: 2.2
locale: zh-hans
source: https://docs.djangoproject.com/zh-hans/2.2/ref/files/
canonical: https://djangodocs.dev/zh-hans/2.2/ref/files/
---
# File handling

- [`File` 对象](/zh-hans/2.2/ref/files/file/)

  - [The `File` class](/zh-hans/2.2/ref/files/file/#the-file-class)
  - [The `ContentFile` class](/zh-hans/2.2/ref/files/file/#the-contentfile-class)
  - [The `ImageFile` class](/zh-hans/2.2/ref/files/file/#the-imagefile-class)
  - [Additional methods on files attached to objects](/zh-hans/2.2/ref/files/file/#additional-methods-on-files-attached-to-objects)
- [File storage API](/zh-hans/2.2/ref/files/storage/)

  - [Getting the current storage class](/zh-hans/2.2/ref/files/storage/#getting-the-current-storage-class)
  - [The `FileSystemStorage` class](/zh-hans/2.2/ref/files/storage/#the-filesystemstorage-class)
  - [The `Storage` class](/zh-hans/2.2/ref/files/storage/#the-storage-class)
- [Uploaded Files and Upload Handlers](/zh-hans/2.2/ref/files/uploads/)

  - [Uploaded files](/zh-hans/2.2/ref/files/uploads/#uploaded-files)
  - [Built-in upload handlers](/zh-hans/2.2/ref/files/uploads/#module-django.core.files.uploadhandler)
  - [Writing custom upload handlers](/zh-hans/2.2/ref/files/uploads/#writing-custom-upload-handlers)
