[ 
https://issues.apache.org/jira/browse/LIBCLOUD-490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13863010#comment-13863010
 ] 

Tomaz Muraus commented on LIBCLOUD-490:
---------------------------------------

[~coderanger] I've pushed an initial fix for this issue. With my fix, multipart 
uploads now also work correctly for empty (0 bytes sized) objects.

This fix / approach is not ideal because it still uses multipart upload which 
induces an overhead of 2 HTTP requests.

I will work with [~mahendra.m] on improving the code and making sure it uses a 
regular upload for objects smaller than <= MIN_CHUNK_SIZE.

> Zero-byte uploads to S3 fail
> ----------------------------
>
>                 Key: LIBCLOUD-490
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-490
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>    Affects Versions: 0.13.3
>            Reporter: Noah Kantrowitz
>
> Calling storage.upload_object_via_stream(iter(('',)), path) fails with:
> {{libcloud.common.types.LibcloudError: <LibcloudError in 
> <libcloud.storage.drivers.s3.S3StorageDriver object at 0x10b786610> 'Error in 
> multipart commit'>}}
> A workaround is temporarily monkeypatch 
> {{S3StorageDriver.supports_s3_multipart_upload = False}}. It would be nice if 
> I could just call put_object directly in some useful way, for data that is 
> small enough to fit in RAM (which in the case of an empty file is a bit of a 
> tautology).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to