def _check_upload_info(req, app, upload_id): container = req.container_name + '+segments' obj = '%s/%s' % (req.object_name, upload_id) try: req.get_response(app, 'HEAD', container=container, obj=obj) except NoSuchKey: raise NoSuchUpload(upload_id=upload_id)
def _get_upload_info(req, app, upload_id): container = req.container_name + MULTIUPLOAD_SUFFIX obj = '%s/%s' % (req.object_name, upload_id) try: return req.get_response(app, 'HEAD', container=container, obj=obj) except NoSuchKey: raise NoSuchUpload(upload_id=upload_id)
def _get_upload_info(req, app, upload_id): container = req.container_name + MULTIUPLOAD_SUFFIX obj = '%s/%s' % (req.object_name, upload_id) req.environ['oio.ephemeral_object'] = True try: res = req.get_response(app, 'HEAD', container=container, obj=obj) return res except NoSuchKey: raise NoSuchUpload(upload_id=upload_id) finally: req.environ['oio.ephemeral_object'] = False