How to send a file in multipart/form-data? #540
Labels
kind/support
Adopter support requests.
status/triage
Collecting information required to triage the issue.
Question
I'm using your package to generate my APIs which has been working great for me. However, as soon as I started working with uploading files, I stumbled upon an issue with
multipart/form-data
. Whenever I use the generated API, it sends the request with the file having a mimetype ofapplication/octet-stream
. Which is something that I am not supporting on the backend nor do I have plans to do so. If I'm uploading a jpeg image, I expect the mimetype to beimage/jpeg
. How do I get this desired behavior?This is how I create data from a UIImage:
This is how I'm using the generated API:
This is my schema for the method:
Where
UploadImageDto
component have this schema:The text was updated successfully, but these errors were encountered: