Skip to content

Expose 'upload' class from 'upload_from_file()' #1077

@sbrinkerhoff

Description

@sbrinkerhoff

When uploading a large file with the Blob.upload_from_file() method it would be extremely convenient to be able to access properties of the upload class that is generated in this method to view upload progress, as well as assert the other properties of that wrapped class.

Something as simple as this:

    def upload_from_file(self, file_obj, rewind=False, size=None,
                         content_type=None, num_retries=6, client=None):

...

        self.upload = transfer.Upload(file_obj, content_type, total_bytes,
                                      auto_transfer=False,
                                      chunksize=self.chunk_size)

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions