Skip to content

Commit

Permalink
Fix Upload data annotation from CVAT to Azure Blob storage (#5596)
Browse files Browse the repository at this point in the history
Fix issue #5149
  • Loading branch information
Marishka17 authored Jan 18, 2023
1 parent 3fa6f35 commit dfb6586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>)
Expand Down
6 changes: 3 additions & 3 deletions cvat/apps/engine/cloud_provider.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) 2021-2023 Intel Corporation
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -455,8 +455,8 @@ def upload_fileobj(self, file_obj, file_name):
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):
Expand Down

0 comments on commit dfb6586

Please sign in to comment.