`Blob.upload_from_filename` fails silently if the blob name starts with '/'
See original GitHub issueUsing google-cloud-storage==1.2.0
, attempting to upload files using Blob.upload_from_filename
fails silently (i.e. no error is raised but the blob is not uploaded) if the blob name starts with a forward slash /
. A basic example is given below.
import google.cloud.storage
client = google.cloud.storage.Client()
bucket = client.get_bucket('some-bucket')
blob = bucket("/some-blob")
blob.upload_from_filename("some-file")
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Upload file to Google Cloud with Python 3 problem
There is a problem in the second last line blob.upload_from_filename(filename) and I want to know how to fix this problem. Here is the...
Read more >Class Blob (2.7.0) | Python client library - Google Cloud
Deletes a blob from Cloud Storage. If user_project is set on the bucket, bills the API request to that project. Parameters. Name, Description....
Read more >Quickstart: Azure Blob Storage library v12 - C++
In this quickstart, you learn how to use the Azure Blob Storage client library version 12 for C++ to create a container and...
Read more >Blobs / Objects — google-cloud 0.20.0 documentation
GoogleCloudError if the upload response returns an error status. upload_from_filename (filename, content_type=None, encryption_key=None, client=None)[source] ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can no longer reproduce this issue using
1.3.0
.I still cannot reproduce this issue:
Note that the
google-cloud-storage
library is no longer maintained in this repository. If you can provide a reproducible case for this issue, please open a new issue in the new repository.