Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2021-03-16 23:54:43 +0300
committerVilém Duha <vilda.novak@gmail.com>2021-03-16 23:54:43 +0300
commite24ff87b48445467f673641504fde759da531148 (patch)
tree17cd0001157aee43ef7cd5e59313ca648d672560 /blenderkit/upload_bg.py
parentd00a25d34fca36687a29aaa6a653c32505c22b36 (diff)
BlenderKit: improve upload interface
Fixed quite a lot of tooltips Brought back a prompt for users to fill in data of the assets. This was accidentally disabled made the asset type enum foldable - takes too much space.
Diffstat (limited to 'blenderkit/upload_bg.py')
-rw-r--r--blenderkit/upload_bg.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/blenderkit/upload_bg.py b/blenderkit/upload_bg.py
index 685e280a..cc64f470 100644
--- a/blenderkit/upload_bg.py
+++ b/blenderkit/upload_bg.py
@@ -91,6 +91,11 @@ def upload_file(upload_data, f):
if 250 > upload_response.status_code > 199:
uploaded = True
+ upload_done_url = paths.get_api_url() + 'uploads_s3/' + upload['id'] + '/upload-file/'
+ upload_response = rerequests.post(upload_done_url, headers=headers, verify=True)
+ print(upload_response)
+ tasks_queue.add_task((ui.add_report, (f"Finished file upload{os.path.basename(f['file_path'])}",)))
+ return True
else:
print(upload_response.text)
message = f"Upload failed, retry. File : {f['type']} {os.path.basename(f['file_path'])}"
@@ -103,13 +108,11 @@ def upload_file(upload_data, f):
time.sleep(1)
# confirm single file upload to bkit server
- print(upload)
- upload_done_url = paths.get_api_url() + 'uploads_s3/' + upload['id'] + '/upload-file/'
- upload_response = rerequests.post(upload_done_url, headers=headers, verify=True)
- tasks_queue.add_task((ui.add_report, (f"Finished file upload{os.path.basename(f['file_path'])}",)))
- return uploaded
+
+
+ return False
def upload_files(upload_data, files):