Revision 614a20dc kamaki/clients/pithos/__init__.py
b/kamaki/clients/pithos/__init__.py | ||
---|---|---|
1381 | 1381 |
source_object=path4url(self.container, obj)) |
1382 | 1382 |
return r.headers |
1383 | 1383 |
|
1384 |
def overwrite_object(self, obj, start, end, source_file, upload_cb=None): |
|
1384 |
def overwrite_object( |
|
1385 |
self, obj, start, end, source_file, |
|
1386 |
content_type=None, upload_cb=None): |
|
1385 | 1387 |
"""Overwrite a part of an object from local source file |
1386 | 1388 |
|
1387 | 1389 |
:param obj: (str) remote object path |
... | ... | |
1392 | 1394 |
|
1393 | 1395 |
:param source_file: open file descriptor |
1394 | 1396 |
|
1397 |
:param content_type: (str) default: application/octet-stream |
|
1398 |
|
|
1395 | 1399 |
:param upload_db: progress.bar for uploading |
1396 | 1400 |
""" |
1397 | 1401 |
|
... | ... | |
1422 | 1426 |
r = self.object_post( |
1423 | 1427 |
obj, |
1424 | 1428 |
update=True, |
1425 |
content_type='application/octet-stream', |
|
1429 |
content_type=content_type or 'application/octet-stream',
|
|
1426 | 1430 |
content_length=len(block), |
1427 | 1431 |
content_range='bytes %s-%s/*' % ( |
1428 | 1432 |
start + offset, |
Also available in: Unified diff