Images upload

I'm trying to get a simple creator upload working in my web app. 1. I have a frontend that passes data to a worker, 2. which should request the OT upload url 3. to put in the form action field 4. so when the user clicks submit, it uploads the image. So far I can't get past #2 . The error I get (passed from the worker, from CF) is: "Bad request: multipart/form-data Content-Type has invalid syntax: lacks boundary" Is there a simple example of this anywhere? Am I way overthinking/misunderstanding this?
2 Replies
mattjqueen2mo ago
For posterity: I removed the Content-type header. 'Content-Type': 'multipart/form-data' based on this: FTW
Stack Overflow
fetch - Missing boundary in multipart/form-data POST
I want to send a new FormData() as the body of a POST request using the fetch api The operation looks something like this: var formData = new FormData() formData.append('myfile', file, 'someFileNam...
Mr4w ago
@mattjqueen did you found solution for that, im having same issue