Merge branch 'cc-5709-airtime-analyzer-cloud-storage' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer-cloud-storage
This commit is contained in:
commit
46542d2b2b
1 changed files with 5 additions and 6 deletions
|
@ -27,13 +27,12 @@ class CloudStorageUploader:
|
||||||
extra = {'meta_data': {'filename': file_base_name},
|
extra = {'meta_data': {'filename': file_base_name},
|
||||||
'acl': 'public-read-write'}
|
'acl': 'public-read-write'}
|
||||||
|
|
||||||
with open(audio_file_path, 'rb') as iterator:
|
obj = driver.upload_object(file_path=audio_file_path,
|
||||||
obj = driver.upload_object_via_stream(iterator=iterator,
|
container=container,
|
||||||
container=container,
|
object_name=object_name,
|
||||||
object_name=object_name,
|
verify_hash=False,
|
||||||
extra=extra)
|
extra=extra)
|
||||||
|
|
||||||
|
|
||||||
metadata["filesize"] = os.path.getsize(audio_file_path)
|
metadata["filesize"] = os.path.getsize(audio_file_path)
|
||||||
|
|
||||||
'''remove file from organize directory'''
|
'''remove file from organize directory'''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue