Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 65530c6176058f9b54858c3b4f6385e6 > files > 757

python-django-doc-1.8.19-1.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" lang="">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>File storage API &#8212; Django 1.8.19 documentation</title>
    
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.8.19',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="top" title="Django 1.8.19 documentation" href="../../contents.html" />
    <link rel="up" title="File handling" href="index.html" />
    <link rel="next" title="Uploaded Files and Upload Handlers" href="uploads.html" />
    <link rel="prev" title="The File object" href="file.html" />



 
<script type="text/javascript" src="../../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body role="document">

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../../index.html">Django 1.8.19 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../../index.html">Home</a>  |
        <a title="Table of contents" href="../../contents.html">Table of contents</a>  |
        <a title="Global index" href="../../genindex.html">Index</a>  |
        <a title="Module index" href="../../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="file.html" title="The &lt;code class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;File&lt;/span&gt;&lt;/code&gt; object">previous</a>
     |
    <a href="../index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="uploads.html" title="Uploaded Files and Upload Handlers">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="ref-files-storage">
            
  <div class="section" id="s-module-django.core.files.storage">
<span id="s-file-storage-api"></span><span id="module-django.core.files.storage"></span><span id="file-storage-api"></span><h1>File storage API<a class="headerlink" href="#module-django.core.files.storage" title="Permalink to this headline">¶</a></h1>
<div class="section" id="s-getting-the-current-storage-class">
<span id="getting-the-current-storage-class"></span><h2>Getting the current storage class<a class="headerlink" href="#getting-the-current-storage-class" title="Permalink to this headline">¶</a></h2>
<p>Django provides two convenient ways to access the current storage class:</p>
<dl class="class">
<dt id="django.core.files.storage.DefaultStorage">
<em class="property">class </em><code class="descname">DefaultStorage</code><a class="reference internal" href="../../_modules/django/core/files/storage.html#DefaultStorage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.DefaultStorage" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#django.core.files.storage.DefaultStorage" title="django.core.files.storage.DefaultStorage"><code class="xref py py-class docutils literal"><span class="pre">DefaultStorage</span></code></a> provides
lazy access to the current default storage system as defined by
<a class="reference internal" href="../settings.html#std:setting-DEFAULT_FILE_STORAGE"><code class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FILE_STORAGE</span></code></a>. <a class="reference internal" href="#django.core.files.storage.DefaultStorage" title="django.core.files.storage.DefaultStorage"><code class="xref py py-class docutils literal"><span class="pre">DefaultStorage</span></code></a> uses
<a class="reference internal" href="#django.core.files.storage.get_storage_class" title="django.core.files.storage.get_storage_class"><code class="xref py py-func docutils literal"><span class="pre">get_storage_class()</span></code></a> internally.</p>
</dd></dl>

<dl class="function">
<dt id="django.core.files.storage.get_storage_class">
<code class="descname">get_storage_class</code>(<em>import_path=None</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#get_storage_class"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.get_storage_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a class or module which implements the storage API.</p>
<p>When called without the <code class="docutils literal"><span class="pre">import_path</span></code> parameter <code class="docutils literal"><span class="pre">get_storage_class</span></code>
will return the current default storage system as defined by
<a class="reference internal" href="../settings.html#std:setting-DEFAULT_FILE_STORAGE"><code class="xref std std-setting docutils literal"><span class="pre">DEFAULT_FILE_STORAGE</span></code></a>. If <code class="docutils literal"><span class="pre">import_path</span></code> is provided,
<code class="docutils literal"><span class="pre">get_storage_class</span></code> will attempt to import the class or module from the
given path and will return it if successful. An exception will be
raised if the import is unsuccessful.</p>
</dd></dl>

</div>
<div class="section" id="s-the-filesystemstorage-class">
<span id="the-filesystemstorage-class"></span><h2>The FileSystemStorage Class<a class="headerlink" href="#the-filesystemstorage-class" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="django.core.files.storage.FileSystemStorage">
<em class="property">class </em><code class="descname">FileSystemStorage</code>(<em>location=None</em>, <em>base_url=None</em>, <em>file_permissions_mode=None</em>, <em>directory_permissions_mode=None</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#FileSystemStorage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.FileSystemStorage" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#django.core.files.storage.FileSystemStorage" title="django.core.files.storage.FileSystemStorage"><code class="xref py py-class docutils literal"><span class="pre">FileSystemStorage</span></code></a> class implements
basic file storage on a local filesystem. It inherits from
<a class="reference internal" href="#django.core.files.storage.Storage" title="django.core.files.storage.Storage"><code class="xref py py-class docutils literal"><span class="pre">Storage</span></code></a> and provides implementations
for all the public methods thereof.</p>
<dl class="attribute">
<dt id="django.core.files.storage.FileSystemStorage.location">
<code class="descname">location</code><a class="headerlink" href="#django.core.files.storage.FileSystemStorage.location" title="Permalink to this definition">¶</a></dt>
<dd><p>Absolute path to the directory that will hold the files.
Defaults to the value of your <a class="reference internal" href="../settings.html#std:setting-MEDIA_ROOT"><code class="xref std std-setting docutils literal"><span class="pre">MEDIA_ROOT</span></code></a> setting.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.files.storage.FileSystemStorage.base_url">
<code class="descname">base_url</code><a class="headerlink" href="#django.core.files.storage.FileSystemStorage.base_url" title="Permalink to this definition">¶</a></dt>
<dd><p>URL that serves the files stored at this location.
Defaults to the value of your <a class="reference internal" href="../settings.html#std:setting-MEDIA_URL"><code class="xref std std-setting docutils literal"><span class="pre">MEDIA_URL</span></code></a> setting.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.files.storage.FileSystemStorage.file_permissions_mode">
<code class="descname">file_permissions_mode</code><a class="headerlink" href="#django.core.files.storage.FileSystemStorage.file_permissions_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>The file system permissions that the file will receive when it is
saved. Defaults to <a class="reference internal" href="../settings.html#std:setting-FILE_UPLOAD_PERMISSIONS"><code class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_PERMISSIONS</span></code></a>.</p>
<div class="versionadded">
<span class="title">New in Django 1.7:</span> <p>The <code class="docutils literal"><span class="pre">file_permissions_mode</span></code> attribute was added. Previously files
always received <a class="reference internal" href="../settings.html#std:setting-FILE_UPLOAD_PERMISSIONS"><code class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_PERMISSIONS</span></code></a> permissions.</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="django.core.files.storage.FileSystemStorage.directory_permissions_mode">
<code class="descname">directory_permissions_mode</code><a class="headerlink" href="#django.core.files.storage.FileSystemStorage.directory_permissions_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>The file system permissions that the directory will receive when it is
saved. Defaults to <a class="reference internal" href="../settings.html#std:setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS"><code class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_DIRECTORY_PERMISSIONS</span></code></a>.</p>
<div class="versionadded">
<span class="title">New in Django 1.7:</span> <p>The <code class="docutils literal"><span class="pre">directory_permissions_mode</span></code> attribute was added. Previously
directories always received
<a class="reference internal" href="../settings.html#std:setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS"><code class="xref std std-setting docutils literal"><span class="pre">FILE_UPLOAD_DIRECTORY_PERMISSIONS</span></code></a> permissions.</p>
</div>
</dd></dl>

<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <code class="docutils literal"><span class="pre">FileSystemStorage.delete()</span></code> method will not raise
an exception if the given file name does not exist.</p>
</div>
</dd></dl>

</div>
<div class="section" id="s-the-storage-class">
<span id="the-storage-class"></span><h2>The Storage Class<a class="headerlink" href="#the-storage-class" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="django.core.files.storage.Storage">
<em class="property">class </em><code class="descname">Storage</code><a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#django.core.files.storage.Storage" title="django.core.files.storage.Storage"><code class="xref py py-class docutils literal"><span class="pre">Storage</span></code></a> class provides a
standardized API for storing files, along with a set of default
behaviors that all other storage systems can inherit or override
as necessary.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For methods returning naive <code class="docutils literal"><span class="pre">datetime</span></code> objects, the
effective timezone used will be the current value of
<code class="docutils literal"><span class="pre">os.environ['TZ']</span></code>; note that this is usually set from
Django&#8217;s <a class="reference internal" href="../settings.html#std:setting-TIME_ZONE"><code class="xref std std-setting docutils literal"><span class="pre">TIME_ZONE</span></code></a>.</p>
</div>
<dl class="method">
<dt id="django.core.files.storage.Storage.accessed_time">
<code class="descname">accessed_time</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.accessed_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.accessed_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a naive <code class="docutils literal"><span class="pre">datetime</span></code> object containing the last
accessed time of the file. For storage systems that aren&#8217;t
able to return the last accessed time this will raise
<code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.created_time">
<code class="descname">created_time</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.created_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.created_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a naive <code class="docutils literal"><span class="pre">datetime</span></code> object containing the creation
time of the file.  For storage systems that aren&#8217;t able to
return the creation time this will raise
<code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.delete">
<code class="descname">delete</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes the file referenced by <code class="docutils literal"><span class="pre">name</span></code>. If deletion is not supported
on the target storage system this will raise <code class="docutils literal"><span class="pre">NotImplementedError</span></code>
instead</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.exists">
<code class="descname">exists</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.exists" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <code class="docutils literal"><span class="pre">True</span></code> if a file referenced by the given name already exists
in the storage system, or <code class="docutils literal"><span class="pre">False</span></code> if the name is available for a new
file.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.get_available_name">
<code class="descname">get_available_name</code>(<em>name</em>, <em>max_length=None</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.get_available_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.get_available_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a filename based on the <code class="docutils literal"><span class="pre">name</span></code> parameter that&#8217;s free and
available for new content to be written to on the target storage
system.</p>
<p>The length of the filename will not exceed <code class="docutils literal"><span class="pre">max_length</span></code>, if provided.
If a free unique filename cannot be found, a
<a class="reference internal" href="../exceptions.html#django.core.exceptions.SuspiciousOperation" title="django.core.exceptions.SuspiciousOperation"><code class="xref py py-exc docutils literal"><span class="pre">SuspiciousFileOperation</span></code></a> exception will be raised.</p>
<p>If a file with <code class="docutils literal"><span class="pre">name</span></code> already exists, an underscore plus a random
7 character alphanumeric string is appended to the filename before
the extension.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.7:</span> <p>Previously, an underscore followed by a number (e.g. <code class="docutils literal"><span class="pre">&quot;_1&quot;</span></code>,
<code class="docutils literal"><span class="pre">&quot;_2&quot;</span></code>, etc.) was appended to the filename until an available
name in the destination directory was found. A malicious user could
exploit this deterministic algorithm to create a denial-of-service
attack. This change was also made in Django 1.6.6, 1.5.9, and
1.4.14.</p>
</div>
<div class="versionchanged">
<span class="title">Changed in Django 1.8:</span> <p>The <code class="docutils literal"><span class="pre">max_length</span></code> argument was added.</p>
</div>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.get_valid_name">
<code class="descname">get_valid_name</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.get_valid_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.get_valid_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a filename based on the <code class="docutils literal"><span class="pre">name</span></code> parameter that&#8217;s suitable
for use on the target storage system.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.listdir">
<code class="descname">listdir</code>(<em>path</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.listdir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.listdir" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists the contents of the specified path, returning a 2-tuple of lists;
the first item being directories, the second item being files. For
storage systems that aren&#8217;t able to provide such a listing, this will
raise a <code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.modified_time">
<code class="descname">modified_time</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.modified_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.modified_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a naive <code class="docutils literal"><span class="pre">datetime</span></code> object containing the last
modified time. For storage systems that aren&#8217;t able to return
the last modified time, this will raise
<code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.open">
<code class="descname">open</code>(<em>name</em>, <em>mode='rb'</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.open" title="Permalink to this definition">¶</a></dt>
<dd><p>Opens the file given by <code class="docutils literal"><span class="pre">name</span></code>. Note that although the returned file
is guaranteed to be a <code class="docutils literal"><span class="pre">File</span></code> object, it might actually be some
subclass. In the case of remote file storage this means that
reading/writing could be quite slow, so be warned.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.path">
<code class="descname">path</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.path" title="Permalink to this definition">¶</a></dt>
<dd><p>The local filesystem path where the file can be opened using Python&#8217;s
standard <code class="docutils literal"><span class="pre">open()</span></code>. For storage systems that aren&#8217;t accessible from
the local filesystem, this will raise <code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.save">
<code class="descname">save</code>(<em>name</em>, <em>content</em>, <em>max_length=None</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.save" title="Permalink to this definition">¶</a></dt>
<dd><p>Saves a new file using the storage system, preferably with the name
specified. If there already exists a file with this name <code class="docutils literal"><span class="pre">name</span></code>, the
storage system may modify the filename as necessary to get a unique
name. The actual name of the stored file will be returned.</p>
<p>The <code class="docutils literal"><span class="pre">max_length</span></code> argument is passed along to
<a class="reference internal" href="../../howto/custom-file-storage.html#django.core.files.storage.get_available_name" title="django.core.files.storage.get_available_name"><code class="xref py py-meth docutils literal"><span class="pre">get_available_name()</span></code></a>.</p>
<p>The <code class="docutils literal"><span class="pre">content</span></code> argument must be an instance of
<a class="reference internal" href="file.html#django.core.files.File" title="django.core.files.File"><code class="xref py py-class docutils literal"><span class="pre">django.core.files.File</span></code></a> or of a subclass of
<a class="reference internal" href="file.html#django.core.files.File" title="django.core.files.File"><code class="xref py py-class docutils literal"><span class="pre">File</span></code></a>.</p>
<div class="versionchanged">
<span class="title">Changed in Django 1.8:</span> <p>The <code class="docutils literal"><span class="pre">max_length</span></code> argument was added.</p>
</div>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.size">
<code class="descname">size</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.size" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the total size, in bytes, of the file referenced by <code class="docutils literal"><span class="pre">name</span></code>.
For storage systems that aren&#8217;t able to return the file size this will
raise <code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

<dl class="method">
<dt id="django.core.files.storage.Storage.url">
<code class="descname">url</code>(<em>name</em>)<a class="reference internal" href="../../_modules/django/core/files/storage.html#Storage.url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.files.storage.Storage.url" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the URL where the contents of the file referenced by <code class="docutils literal"><span class="pre">name</span></code>
can be accessed. For storage systems that don&#8217;t support access by URL
this will raise <code class="docutils literal"><span class="pre">NotImplementedError</span></code> instead.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">File storage API</a><ul>
<li><a class="reference internal" href="#getting-the-current-storage-class">Getting the current storage class</a></li>
<li><a class="reference internal" href="#the-filesystemstorage-class">The FileSystemStorage Class</a></li>
<li><a class="reference internal" href="#the-storage-class">The Storage Class</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="file.html">The <code class="docutils literal"><span class="pre">File</span></code> object</a></li>
    
    
      <li>Next: <a href="uploads.html">Uploaded Files and Upload Handlers</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../../index.html">Django 1.8.19 documentation</a>
        
          <ul><li><a href="../index.html">API Reference</a>
        
          <ul><li><a href="index.html">File handling</a>
        
        <ul><li>File storage API</li></ul>
        </li></ul></li></ul>
      </li>
  </ul>

  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/ref/files/storage.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Mar 10, 2018</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="file.html" title="The &lt;code class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;File&lt;/span&gt;&lt;/code&gt; object">previous</a>
     |
    <a href="../index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="uploads.html" title="Uploaded Files and Upload Handlers">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>