diff options
author | Vilem Duha <vilem.duha@gmail.com> | 2019-04-25 23:35:26 +0300 |
---|---|---|
committer | Vilem Duha <vilem.duha@gmail.com> | 2019-05-19 16:45:48 +0300 |
commit | e16c55a110a5cde3bf5c83a156195b5d71481488 (patch) | |
tree | f902eae2914f0dc2759957e862d96e79843982ac /blenderkit/upload_bg.py | |
parent | d2808959bb845ec945aa7fac494db42a9228021b (diff) |
BlenderKit: Oauth browser login. No more hassle with API keys for the users. Needs testing.
renamed get_bkit_url to get_api_url
task queue is a new simple module to do tasks, more timed tasks should come here instead of being in assetbar as of now. (download, search checks and more)
Diffstat (limited to 'blenderkit/upload_bg.py')
-rw-r--r-- | blenderkit/upload_bg.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/blenderkit/upload_bg.py b/blenderkit/upload_bg.py index 538f9784..1fa6f6fb 100644 --- a/blenderkit/upload_bg.py +++ b/blenderkit/upload_bg.py @@ -76,7 +76,7 @@ def upload_files(filepath, upload_data, files): 'fileIndex': f['index'], 'originalFilename': os.path.basename(f['file_path']) } - upload_create_url = paths.get_bkit_url() + 'uploads/' + upload_create_url = paths.get_api_url() + 'uploads/' upload = requests.post(upload_create_url, json=upload_info, headers=headers, verify=True) upload = upload.json() @@ -108,7 +108,7 @@ def upload_files(filepath, upload_data, files): time.sleep(1) # confirm single file upload to bkit server - upload_done_url = paths.get_bkit_url() + 'uploads_s3/' + upload['id'] + '/upload-file/' + upload_done_url = paths.get_api_url() + 'uploads_s3/' + upload['id'] + '/upload-file/' upload_response = requests.post(upload_done_url, headers=headers, verify=True) bg_blender.progress('finished uploading') @@ -187,7 +187,7 @@ if __name__ == "__main__": "verificationStatus": "uploaded" } - url = paths.get_bkit_url() + 'assets/' + url = paths.get_api_url() + 'assets/' headers = utils.get_headers(upload_data['token']) |