On Fri, Jan 16, 2009 at 1:07 AM, Damien Katz <[email protected]> wrote:
> I checked in streaming attachment writes for attachment uploads (ie PUT
> /db/docid/attachment.txt ...). This allows that huge files can be uploaded
> without CouchDB buffering it to memory, making is possible to upload huge
> attachments.
>
> Unfortunately, we don't yet stream the attachments for replication w and you
> can't update an attachment and the document json in single request yet, so
> this is of limited use for now. That will require sending documents in http
> multi-part, and support for that is on the to-do list.
>
> -Damien
>

Thanks for this update :) I've just tested this morning, here on a 2GB
of ram machine, it didn''t work with curl in chunked transfert
encoding. It doesn't work either in chunked mode with one script I
have. However it works with this script based on py-restclient
(attached) in normal mode.

Thanks for this progress :)

- benoit
import os
from restclient import Resource

f = open('test640')

res = Resource('http://127.0.0.1:5984/test')

content = res.put('/blah/test640', payload=f, headers={
    'Accept': 'application/json',
    'Connection': 'keep-alive',
    'Content-Type': 'application/octet-stream',
    'Keep-Alive': '300',
    'Content-Length': os.path.getsize('test.mp3')}, rev="3333645605")

print content

Reply via email to