#how can I get the form data?
9 messages · Page 1 of 1 (latest)
Assuming the data was posted to your api endpoint with the content-type "multipart/form-data", you can use await request.formdata() to get a FormData object.
Docs
The formData() method of the Request interface
reads the request body and returns it as a promise that resolves with a FormData object.
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the fetch() or XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
ty
is it possible to get the image data?