I have a Django app running on GAE(Google App Engine) standard environment. I am uploading videos via my app to google cloud buckets (utilising dropzone on front end). The size of my videos are large so I am sending my file in chunks to GAE and then recreate and upload to GCS. It is working fine.
My issues is the request to upload the chunks are taking a long time (15s for uploading a chunk of 1MB, I removed the processing of the chunk and still taking 15s)
@login_required(login_url="/login/")
@require_http_methods(["POST"])
def upload_chunks(request):
try:
file = request.FILES['file']
# upload_utils.upload_image_file(file); //Commented it out
return JsonResponse({"status": True})
except Exception as e:
return HttpResponseServerError(str(e))
Every Chunk Upload takes 15 sec and all of the time is spent in TTFB
Also when increase my chunk size to let's say 8 MB the request get cancelled as it takes more than 30 sec.
Please help!!