Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
c7fa27d7
Kaydet (Commit)
c7fa27d7
authored
Agu 23, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #23344 -- Removed duplicate docs for file upload settings.
üst
2c681e8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
52 deletions
+16
-52
settings.txt
docs/ref/settings.txt
+14
-5
file-uploads.txt
docs/topics/http/file-uploads.txt
+2
-47
No files found.
docs/ref/settings.txt
Dosyayı görüntüle @
c7fa27d7
...
...
@@ -1243,7 +1243,10 @@ Default::
("django.core.files.uploadhandler.MemoryFileUploadHandler",
"django.core.files.uploadhandler.TemporaryFileUploadHandler")
A tuple of handlers to use for uploading. See :doc:`/topics/files` for details.
A tuple of handlers to use for uploading. Changing this setting allows complete
customization -- even replacement -- of Django's upload process.
See :doc:`/topics/files` for details.
.. setting:: FILE_UPLOAD_MAX_MEMORY_SIZE
...
...
@@ -1290,6 +1293,9 @@ dependent behavior. On most platforms, temporary files will have a mode
of ``0o600``, and files saved from memory will be saved using the
system's standard umask.
For security reasons, these permissions aren't applied to the temporary files
that are stored in :setting:`FILE_UPLOAD_TEMP_DIR`.
This setting also determines the default permissions for collected static files
when using the :djadmin:`collectstatic` management command. See
:djadmin:`collectstatic` for details on overriding it.
...
...
@@ -1303,7 +1309,6 @@ when using the :djadmin:`collectstatic` management command. See
way that modes must be specified. If you try to use ``644``, you'll
get totally incorrect behavior.
.. setting:: FILE_UPLOAD_TEMP_DIR
FILE_UPLOAD_TEMP_DIR
...
...
@@ -1311,9 +1316,11 @@ FILE_UPLOAD_TEMP_DIR
Default: ``None``
The directory to store data temporarily while uploading files. If ``None``,
Django will use the standard temporary directory for the operating system. For
example, this will default to '/tmp' on \*nix-style operating systems.
The directory to store data (typically files larger than
:setting:`FILE_UPLOAD_MAX_MEMORY_SIZE`) temporarily while uploading files.
If ``None``, Django will use the standard temporary directory for the operating
system. For example, this will default to ``/tmp`` on \*nix-style operating
systems.
See :doc:`/topics/files` for details.
...
...
@@ -2926,6 +2933,8 @@ Error reporting
* :setting:`MANAGERS`
* :setting:`SILENCED_SYSTEM_CHECKS`
.. _file-upload-settings:
File uploads
------------
* :setting:`DEFAULT_FILE_STORAGE`
...
...
docs/topics/http/file-uploads.txt
Dosyayı görüntüle @
c7fa27d7
...
...
@@ -168,53 +168,8 @@ defaults" which can be customized as described in the next section.
Changing upload handler behavior
--------------------------------
There are a few settings which control Django's file upload behavior:
:setting:`FILE_UPLOAD_MAX_MEMORY_SIZE`
The maximum size, in bytes, for files that will be uploaded into memory.
Files larger than :setting:`FILE_UPLOAD_MAX_MEMORY_SIZE` will be
streamed to disk.
Defaults to 2.5 megabytes.
:setting:`FILE_UPLOAD_TEMP_DIR`
The directory where uploaded files larger than
:setting:`FILE_UPLOAD_MAX_MEMORY_SIZE` will be stored.
Defaults to your system's standard temporary directory (i.e. ``/tmp`` on
most Unix-like systems).
:setting:`FILE_UPLOAD_PERMISSIONS`
The numeric mode (i.e. ``0o644``) to set newly uploaded files to. For
more information about what these modes mean, see the documentation for
:func:`os.chmod`.
If this isn't given or is ``None``, you'll get operating-system
dependent behavior. On most platforms, temporary files will have a mode
of ``0o600``, and files saved from memory will be saved using the
system's standard umask.
For security reasons, these permissions aren't applied to the temporary
files that are stored in :setting:`FILE_UPLOAD_TEMP_DIR`.
.. warning::
If you're not familiar with file modes, please note that the leading
``0`` is very important: it indicates an octal number, which is the
way that modes must be specified. If you try to use ``644``, you'll
get totally incorrect behavior.
**Always prefix the mode with a 0.**
:setting:`FILE_UPLOAD_DIRECTORY_PERMISSIONS`
The numeric mode to apply to directories created in the process of
uploading files. This value mirrors the functionality and caveats of
the :setting:`FILE_UPLOAD_PERMISSIONS` setting.
:setting:`FILE_UPLOAD_HANDLERS`
The actual handlers for uploaded files. Changing this setting allows
complete customization -- even replacement -- of Django's upload
process.
There are a few settings which control Django's file upload behavior. See
:ref:`File Upload Settings <file-upload-settings>` for details.
Modifying upload handlers on the fly
------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment