Uploading file takes more than expected #126
Unanswered
christiankf
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi @christiankf, Thanks for reaching out. This is an interesting case. I believe the delay you are experience is due to the app server loading the file from S3 and maybe even doing something to it. What causes the file to be pulled into your applications memory depends on your objects model. If you'd share that with me, I might be able to help. If this happens to be an I hope that helps you a bit. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there
First, thanks for this awesome plugin. Works like a charm and is (almost) exactly what I need.
So maybe I'm understanding something wrong of need to configure something but I have the following scenario:
The part of my code looks like this to handle the upload:
So this works. But the thing is that the last step 4) apparently takes more time at
obj.upload = upload
, the bigger the file is (a couple of hundred MBs took already something like 20-30s). So the user when they click "upload" see the upload progress but then have to wait still quite some time until the view actually loaded. I assume that this is because the file is "moved" on S3. But it probably is not a move but a copy, which would explain that the bigger the file is it takes longer.So, somehow I this can't the the expected behaviour as it does upload the file directly to S3 but the advantage is only partially as the user now has to wait for the upload almost twice (upload + the time that it takes to copy the file).
Is this intended like that? Are there any good workaround or can I configure something in django-s3file or django-storages that the saving doesn't take that much time?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions