Skip to content

[FR]: Set chunk size on upload task #10137

Closed
@cclaan

Description

@cclaan

Description

I may be missing something very obvious, but I see no way to set the upload chunk size from swift code for a 'FIRStorageUploadTask' created via FIRStorageReference putFile.
e.g.

letuploadTask= remoteRef.putFile(from: fileURL, metadata: metadata)
  1. Use case: allow custom chunk sizes so resumable uploads work by default
  2. Currently the chunk size seems hard coded to a large value
  3. I propose allowing custom chunk sizes

In FIRStorageUploadTask.m the chunk size seems to be set from the constant kGTMSessionUploadFetcherStandardChunkSize which is set to LLONG_MAX;

 GTMSessionUploadFetcher *uploadFetcher =[GTMSessionUploadFetcher uploadFetcherWithRequest:request uploadMIMEType:strongSelf->_uploadMetadata.contentType chunkSize:kGTMSessionUploadFetcherStandardChunkSize fetcherService:self.fetcherService];

Perhaps there is a way to modify this somewhere, but I can't find any documentation on it.

Thanks for any support.

API Proposal

letuploadTask= remoteRef.putFile(from: fileURL, metadata: metadata, chunkSize: myChunkSize )

Firebase Product(s)

Storage

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    close