parent
4d6f96cd6c
commit
cbf7c2bf44
4 changed files with 58 additions and 55 deletions
|
@ -101,10 +101,6 @@ class BaseStorage(StoragePaths):
|
|||
raise NotImplementedError
|
||||
|
||||
|
||||
class InvalidChunkException(RuntimeError):
|
||||
pass
|
||||
|
||||
|
||||
class BaseStorageV2(BaseStorage):
|
||||
def initiate_chunked_upload(self):
|
||||
""" Start a new chunked upload, returning the uuid and any associated storage metadata
|
||||
|
@ -113,9 +109,9 @@ class BaseStorageV2(BaseStorage):
|
|||
|
||||
def stream_upload_chunk(self, uuid, offset, length, in_fp, storage_metadata, content_type=None):
|
||||
""" Upload the specified amount of data from the given file pointer to the chunked destination
|
||||
specified, starting at the given offset. Returns the number of bytes uploaded, and a new
|
||||
version of the storage_metadata. Raises InvalidChunkException if the offset or length can
|
||||
not be accepted. Pass length as -1 to upload as much data from the in_fp as possible.
|
||||
specified, starting at the given offset. Returns the number of bytes uploaded, a new
|
||||
version of the storage_metadata and an error object (if one occurred or None if none).
|
||||
Pass length as -1 to upload as much data from the in_fp as possible.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
|
Reference in a new issue