Repository navigation
Makes checking fstat for file optional. - #914
Conversation
In storage, file upload will now fail if no size is passed in and if the file object does not have a fileno which can be stat'ed. Fixes googleapis#900.
commented
Jun 6, 2015
|
@jonparrott This doesn't quite go all the way to fix what you wanted. It still requires |
commented
Jun 6, 2015
|
@Capstan : There's no way for GCS to just "not care about the size, we'll tell you when we're done piping data into it", right? |
commented
Jun 6, 2015
|
It's an HTTP header thing. |
commented
Jun 6, 2015
|
Code LGTM. The comment to @Capstan is in the hopes that we can send chunks until we're done sending chunks, and GCS counts the total bytes then... done and done. (That way, a stream that doesn't have a size up front, would be uploadable... right?) |
commented
Jun 7, 2015
|
re: @jgeewax On the contrary, there are two published ways to send without knowing a final size. The first works with single-POST / single-PUT (simple and multipart) and just uses The second works with resumable uploads. You omit the |
commented
Jun 7, 2015
|
OK so then the question becomes: if I can send chunks until I'm done sending chunks, what's stopping us from uploading an arbitrary stream? (I think this conversation is deviating from the topic of this PR though, so maybe best to discuss in a separate issue? The original maybe?) |
commented
Jun 7, 2015
|
This at least helps from a user perspective (way better error message) so this LGTM. However, I agree with @jgeewax - we should just be able to upload an arbitrary stream. |
commented
Jun 9, 2015
|
LGTM |
In storage, file upload will now fail if no size is passed in and if the file object does not have a fileno
which can be stat'ed.
Fixes #900.