0

Here is my code,

var uploadparameter = {
    base64url: imageData,        
};

$.ajax({
   url: '@(Url.Action("CustomAsyncUpload", "ProductCreation"))',
   type: 'POST',
   data: JSON.stringify(uploadparameter),
   contentType: 'application/json; charset=utf-8',
   success: function (data) 
   {

   }
});

When I'm passing too large base64 url in ajax call using asp.net core that time i'm facing issue.

So,How to pass too large base64 url in ajax call using asp.net core..?

Thanks, Kaushik.

7
  • Can you provide more info about the issue? Is there an error message? or some sort Commented Apr 6, 2018 at 6:59
  • @PetIbaño error message is - requested header is too large. Commented Apr 6, 2018 at 7:01
  • Is base64 required when uploading a file? If not, I would suggest using FormData for large files. Commented Apr 6, 2018 at 7:07
  • Here's an example Commented Apr 6, 2018 at 7:09
  • @PetIbaño yes bas64 is required, because im implementing crop image functionality so i required. Commented Apr 6, 2018 at 7:24

1 Answer 1

0

As you are passing base64 so it has huge amount of string, so until it get upload you will get request timeout error, so Don't pass in base64, send image with form-data while uploading.

Sign up to request clarification or add additional context in comments.

1 Comment

anyhow i want to pass base64 url in ajax call because my client requirement is that type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.