diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-27 22:21:14 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-27 22:21:14 +0000 |
| commit | ff420b43647dd7f149f000efd2c7eb077f6ba5cf (patch) | |
| tree | 5e183421e0d4b78fa607f5b0fd664c3d3b2c7f29 /docs/ref/settings.txt | |
| parent | f58217cc02fe6779a69bdf092ce6095bb368401c (diff) | |
Fixed #8454: added a FILE_UPLOAD_PERMISSIONS setting to control the permissoin of files uploaded by the built-in file storage system. Thanks, dcwatson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/settings.txt')
| -rw-r--r-- | docs/ref/settings.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index e4e32742ea..6273a3676f 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -453,6 +453,8 @@ Default: ``'utf-8'`` The character encoding used to decode any files read from disk. This includes template files and initial SQL data files. +.. setting:: FILE_UPLOAD_HANDLERS + FILE_UPLOAD_HANDLERS -------------------- @@ -465,6 +467,8 @@ Default:: A tuple of handlers to use for uploading. See :ref:`topics-files` for details. +.. setting:: FILE_UPLOAD_MAX_MEMORY_SIZE + FILE_UPLOAD_MAX_MEMORY_SIZE --------------------------- @@ -475,6 +479,8 @@ Default: ``2621440`` (i.e. 2.5 MB). The maximum size (in bytes) that an upload will be before it gets streamed to the file system. See :ref:`topics-files` for details. +.. setting:: FILE_UPLOAD_TEMP_DIR + FILE_UPLOAD_TEMP_DIR -------------------- @@ -488,6 +494,34 @@ example, this will default to '/tmp' on \*nix-style operating systems. See :ref:`topics-files` for details. +.. setting:: FILE_UPLOAD_PERMISSIONS + +FILE_UPLOAD_PERMISSIONS +----------------------- + +Default: ``None`` + +The numeric mode (i.e. ``0644``) to set newly uploaded files to. For +more information about what these modes mean, see the `documentation for +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 ``0600``, and files saved from memory will be saved using the +system's standard umask. + +.. warning:: + + **Always prefix the mode with a 0.** + + 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. + + +.. _documentation for os.chmod: http://docs.python.org/lib/os-file-dir.html + .. setting:: FIXTURE_DIRS FIXTURE_DIRS |
