I am currently mocking out several endpoints in Paw, including one that would typicaly receive multipart form data as a combination of standard text input as well as a file.
If it were a form, it would look like this:
<form action="/image/save" method="post" enctype="multipart/form-data"> <input name="text-stuff" type="text" /> <input name="image-stuff" type="file" /> <input type="submit" value="Save"/> </form>
How do I upload a file as part of a multipart request in Paw?
Follow this rules when creating a multipart form: Specify enctype="multipart/form-data" attribute on a form tag. Add a name attribute to a single input type="file" tag. DO NOT add a name attribute to any other input, select or textarea tags.
With curl, you add each separate multipart with one -F (or --form ) flag and you then continue and add one -F for every input field in the form that you want to send. The above small example form has two parts, one named 'person' that is a plain text field and one named 'secret' that is a file.
Multipart requests combine one or more sets of data into a single body, separated by boundaries. You typically use these requests for file uploads and for transferring data of several types in a single request (for example, a file along with a JSON object).
Interface MultipartFile. A representation of an uploaded file received in a multipart request. The file contents are either stored in memory or temporarily on disk. In either case, the user is responsible for copying file contents to a session-level or persistent store as and if desired.
And found 5 mins later.
You need to right click on the field, then select "File".
Link
Update Dec 2017
https://paw.cloud/docs/getting-started/set-request-body#Set_Multipart_body
Previously
As note in the comments, the original link has died https://web.archive.org/web/20150326015604/http://luckymarmot.com/paw/doc/Send_Files_as_Multipart_Form_Data
Original reference
https://luckymarmot.com/paw/doc/Send_Files_as_Multipart_Form_Data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With