Formdata submission, prompting newline character problem

  1. is working on a react project recently, which involves a problem of uploading images. Use formdata, but the API returns a newline character. I"ve already passed the rules. Is there any great god to take a look at it?

clipboard.png

3.
clipboard.png

4. I would like to thank all the great gods in advance!

The code of

1 is incomplete. There is a section after ajax. Why is
2datatype before formdata
3ajax needs to be printed by console to see


this is the hint returned to you by the backend. From the prompt, there is something wrong with the content he prompts you to enter. Try using the trim () method to remove the blank characters on both sides of the input.

Menu