Hi team,
I am using v8, and trying to upload a file to ACC using /nl/jsp/uploadFile.jsp.
When we use the v5 compatibility fileInput file gets uploaded to the server, while if I use the normal HTML and AJAX to upload the file, it gives an error. ( 403 - Forbidden )
If I use postman / nodejs script to read the file and upload to /nl/jsp/uploadFile.jsp, file gets uploaded properly.
What could be the reason 403 error, I tried with __sessiontoken cookie, __securitytoken, and also with Bearer Token, which works in postman, but not within the WebApp
Please help
Regards,
DG
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @dipendu_g Are you using correct form encoding to upload file via Ajax?
Here is what is used in form to upload images.
enctype="multipart/form-data"
Views
Replies
Total Likes
Hi @_Manoj_Kumar_ ,
I am using FormData to store the uploaded file and then using fetch to upload.
await fetch('/nl/jsp/uploadFile.jsp', {
method: "POST",
body: formData,
headers:myHeaders
});
Views
Replies
Total Likes
Hello @dipendu_g what is the value of formDate here?
Views
Replies
Total Likes
Views
Replies
Total Likes
Hello @dipendu_g Do you see the same payload value in webApp with v5?
Depending on where the file is store the the payload field can change.
Views
Replies
Total Likes
Hi @_Manoj_Kumar_ ,
I can see payload with v5, file approach. Here we are creating our own form. The v5 file upload works
Regards,
DG
Views
Replies
Total Likes