Skip to content

storage: a way to specify Content-Length during upload #601

@gmiroshnykov

Description

@gmiroshnykov

Cloud Storage docs mention that you have to specify Content-Length header for upload requests, but I guess this is not a hard requirement as gcloud-node does not do that (as far as I can see) and provides an API for streaming uploads of unknown length using Transfer-Encoding: chunked.

I'd like to be able to explicitly set a known Content-Length in advance.

This might help catching the kind of programmer mistake (which I am guilty of) when you're piping an HTTP request into a stream returned by file.createWriteStream(), but accidentally aborting the HTTP request prematurely. In that case CRC32 / MD5 checksums won't save you because the actual bytes are intact and the upload was technically complete, but logically incomplete.

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions