Fix Upload data annotation from CVAT to Azure Blob storage (#5596)

Fix issue #5149
main
Maria Khrustaleva 3 years ago committed by GitHub
parent 3fa6f35031
commit dfb658653f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Helm: Empty password for Redis (<https://github.com/opencv/cvat/pull/5520>)
- Fixed HRNet serverless function runtime error on images with alpha channel (<https://github.com/opencv/cvat/pull/5570>)
- Preview & chunk cache settings are ignored (<https://github.com/opencv/cvat/pull/5569>)
- Export annotations to Azure container (<https://github.com/opencv/cvat/pull/5596>)
### Security
- Fixed vulnerability with social authentication (<https://github.com/opencv/cvat/pull/5521>)

@ -1,4 +1,4 @@
# Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) 2021-2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -455,8 +455,8 @@ class AzureBlobContainer(_CloudStorage):
def upload_file(self, file_path, file_name=None):
if not file_name:
file_name = os.path.basename(file_path)
with open(file_path, 'r') as f:
self.upload_fileobj(f, file_name)
with open(file_path, 'rb') as f:
self.upload_fileobj(f.read(), file_name)
# TODO:
# def multipart_upload(self, file_obj):

Loading…
Cancel
Save