From 7675d484835a56b138a67367ea8ec80c203e77f8 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Wed, 16 Aug 2023 14:47:39 +0800 Subject: [PATCH] feat: add logic of avatar image uploading 3 --- app/api/v1/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/v1/api.py b/app/api/v1/api.py index da104ac..550f0ad 100644 --- a/app/api/v1/api.py +++ b/app/api/v1/api.py @@ -22,7 +22,7 @@ def wechat_login(files_data): f = files_data['image'] try: result = rpc.storage.upload(file_name='avatar_' + str(session['user_id']), - file_binary=f.stream, + file_binary=f.read(), bucket='bodyrecord', folder='avatar', app='bodyrecord')