From 266fa40f6114f65085405e66447aaeca945eaab7 Mon Sep 17 00:00:00 2001 From: VladislavOstapov Date: Wed, 5 Apr 2023 13:25:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20media.upload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api_methods.py b/api/api_methods.py index 01779ae..7b657b1 100755 --- a/api/api_methods.py +++ b/api/api_methods.py @@ -746,7 +746,7 @@ class ApiMedia: await sync_to_async(s3_upload_from_buffer)(storage_name, request.FILES['file'].read()) m = await Media.objects.acreate(owner=access_token.user, original_name=filename, - extension=ext, storage_name=storage_name) + extension=ext, storage_name=storage_name, size=request.FILES['file'].size) return api_make_response({'media_id': m.id}) except Exception: traceback.print_exc()