title: Google Cloud Storage bucket has stopped overwriting files by default when uploading with the Python library
body: <p>I have an App Engine cron job that runs every week, uploading a file called <code>logs.json</code> to a Google Cloud Storage bucket.</p>
  
  <p>For the past few months, this file has been overwritten each time the new version was uploaded.</p>
  
  <p>In the last few weeks, rather than overwriting the file, the existing copy has been retained and the new one uploaded under a different name, e.g. <code>logs_XHjYmP3.json</code>.</p>
  
  <p>This is a simplified snippet from the Django storage class where the upload is performed. I have verified that the filename is correct at the point of upload:</p>
  
  <pre><code># Prints 'logs.json'
  print(file.name)
  blob.upload_from_file(file, content_type=content_type)
  blob.make_public()
  </code></pre>
  
  <p>Reading the <a href="https://googleapis.github.io/google-cloud-python/latest/storage/blobs.html#google.cloud.storage.blob.Blob.upload_from_file" rel="nofollow noreferrer">documentation</a>, it says:</p>
  
  <blockquote>
    <p>The effect of uploading to an existing blob depends on the
    “versioning” and “lifecycle” policies defined on the blob’s bucket. In
    the absence of those policies, upload will overwrite any existing
    contents.</p>
  </blockquote>
  
  <p>The versioning for the bucket is set to suspended, and I'm not aware of any other settings or any changes I have made that would affect this.</p>
  
  <p>How can I make the file upload overwrite any existing file with the same name?</p>