0

My Web API Already published. One of our application specification is upload an image (there are 3 images can uploaded). From the front end we already compressed the image from (at least) 3 MB into 500 KB. and there is no issue with that and when post or get data just need 1,2 - 1,3 seconds.

From frontend we are using BASE64.

But Our User request to us some Enhancement where they need to upload an image (without size & Resolution compressing) with original size, where the size of an one image is 3MB (at least). we have tried with existing Web API and there is a major issue occur, which is our application cannot post the data into backend.

My assumption is there need a long time to upload a large image and then the connection timed out.

If the my assumption is right, so please help me, How to increase the time out when large images are uploaded ?

I had tried to use form-data, but still take long time to upload the large images.

this my JSON. Sorry, I can just upload image.. cause limit characters in stackoverflow that can post.

enter image description here

farid wahyu
  • 81
  • 1
  • 11
  • Can you provide more context and code? Does it work with a 500kb file but not a 3mb file? What code is getting the timeout errors? Do you uploado one file or both? – Talles Santana Mar 21 '22 at 05:06
  • My guess is your front end is throwing the timeout so you will need to adjust the timeout there. There is also this but idk what you are using https://stackoverflow.com/questions/579523/how-do-i-set-the-request-timeout-for-one-controller-action-in-an-asp-net-mvc-app – NavidM Mar 21 '22 at 05:36
  • @NavidM.. thanks, For your help, its maybe can reduce the risk of Time-out. But I Think transaction will be took a long time because the package data is big. – farid wahyu Mar 21 '22 at 07:13
  • @TallesSantana.. ok i will edit my post – farid wahyu Mar 21 '22 at 07:14

0 Answers0