Revision 6d817842
b/docs/source/devguide.rst | ||
---|---|---|
294 | 294 |
last_modified The last object modification date (regardless of version) |
295 | 295 |
x_object_version The object's version identifier |
296 | 296 |
x_object_version_timestamp The object's version timestamp |
297 |
x_object_manifest Large object support (optional)
|
|
297 |
x_object_manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
298 | 298 |
x_object_public Object is publicly accessible (optional) |
299 | 299 |
x_object_meta_* Optional user defined metadata |
300 | 300 |
========================== ====================================== |
... | ... | |
412 | 412 |
Content-Disposition The presentation style of the object (optional) |
413 | 413 |
X-Object-Version The object's version identifier |
414 | 414 |
X-Object-Version-Timestamp The object's version timestamp |
415 |
X-Object-Manifest Large object support (optional)
|
|
415 |
X-Object-Manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
416 | 416 |
X-Object-Public Object is publicly accessible (optional) |
417 | 417 |
X-Object-Meta-* Optional user defined metadata |
418 | 418 |
========================== =============================== |
... | ... | |
501 | 501 |
Content-Disposition The presentation style of the object (optional) |
502 | 502 |
X-Object-Version The object's version identifier |
503 | 503 |
X-Object-Version-Timestamp The object's version timestamp |
504 |
X-Object-Manifest Large object support (optional)
|
|
504 |
X-Object-Manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
505 | 505 |
X-Object-Public Object is publicly accessible (optional) |
506 | 506 |
X-Object-Meta-* Optional user defined metadata |
507 | 507 |
========================== =============================== |
... | ... | |
534 | 534 |
X-Source-Version The source version to copy/move from |
535 | 535 |
Content-Encoding The encoding of the object (optional) |
536 | 536 |
Content-Disposition The presentation style of the object (optional) |
537 |
X-Object-Manifest Large object support (optional)
|
|
537 |
X-Object-Manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
538 | 538 |
X-Object-Public Object is publicly accessible (optional) |
539 | 539 |
X-Object-Meta-* Optional user defined metadata |
540 | 540 |
==================== ================================ |
... | ... | |
569 | 569 |
Content-Encoding The encoding of the object (optional) |
570 | 570 |
Content-Disposition The presentation style of the object (optional) |
571 | 571 |
X-Source-Version The source version to copy/move from |
572 |
X-Object-Manifest Large object support (optional)
|
|
572 |
X-Object-Manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
573 | 573 |
X-Object-Public Object is publicly accessible (optional) |
574 | 574 |
X-Object-Meta-* Optional user defined metadata |
575 | 575 |
==================== ================================ |
... | ... | |
601 | 601 |
Transfer-Encoding Set to ``chunked`` to specify incremental uploading (if used, ``Content-Length`` is ignored) |
602 | 602 |
Content-Encoding The encoding of the object (optional) |
603 | 603 |
Content-Disposition The presentation style of the object (optional) |
604 |
X-Object-Manifest Large object support (optional)
|
|
604 |
X-Object-Manifest Object parts prefix in ``<container>/<object>`` form (optional)
|
|
605 | 605 |
X-Object-Public Object is publicly accessible (optional) |
606 | 606 |
X-Object-Meta-* Optional user defined metadata |
607 | 607 |
==================== ================================ |
b/pithos/api/functions.py | ||
---|---|---|
432 | 432 |
hashmaps = [] |
433 | 433 |
if 'X-Object-Manifest' in meta: |
434 | 434 |
try: |
435 |
src_container, src_name = split_container_object_string(meta['X-Object-Manifest']) |
|
435 |
src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
|
|
436 | 436 |
objects = backend.list_objects(request.user, v_account, src_container, prefix=src_name, virtual=False) |
437 | 437 |
except ValueError: |
438 | 438 |
raise BadRequest('Invalid X-Object-Manifest header') |
b/pithos/api/util.py | ||
---|---|---|
160 | 160 |
hash = '' |
161 | 161 |
bytes = 0 |
162 | 162 |
try: |
163 |
src_container, src_name = split_container_object_string(meta['X-Object-Manifest']) |
|
163 |
src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
|
|
164 | 164 |
objects = backend.list_objects(request.user, v_account, src_container, prefix=src_name, virtual=False) |
165 | 165 |
for x in objects: |
166 | 166 |
src_meta = backend.get_object_meta(request.user, v_account, src_container, x[0], x[1]) |
... | ... | |
209 | 209 |
raise NotModified('Resource Etag matches') |
210 | 210 |
|
211 | 211 |
def split_container_object_string(s): |
212 |
if not len(s) > 0 or s[0] != '/': |
|
213 |
raise ValueError |
|
214 |
s = s[1:] |
|
212 | 215 |
pos = s.find('/') |
213 | 216 |
if pos == -1: |
214 | 217 |
raise ValueError |
b/pithos/backends/simple.py | ||
---|---|---|
259 | 259 |
"""Copy an object's data and metadata.""" |
260 | 260 |
|
261 | 261 |
logger.debug("copy_object: %s %s %s %s %s %s %s %s", account, src_container, src_name, dest_container, dest_name, dest_meta, replace_meta, src_version) |
262 |
self._get_containerinfo(account, src_container) |
|
262 | 263 |
if src_version is None: |
263 | 264 |
src_path = self._get_objectinfo(account, src_container, src_name)[0] |
264 | 265 |
else: |
b/pithos/public/functions.py | ||
---|---|---|
109 | 109 |
hashmaps = [] |
110 | 110 |
if 'X-Object-Manifest' in meta: |
111 | 111 |
try: |
112 |
src_container, src_name = split_container_object_string(meta['X-Object-Manifest']) |
|
112 |
src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
|
|
113 | 113 |
objects = backend.list_objects(request.user, v_account, src_container, prefix=src_name, virtual=False) |
114 | 114 |
except ValueError: |
115 | 115 |
raise ItemNotFound('Object does not exist') |
Also available in: Unified diff