Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I upload a file as part of a multipart request in Paw?

Tags:

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?

like image 934
Chris Avatar asked Dec 27 '15 08:12

Chris


People also ask

How do I upload a file to multipart?

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.

How do you send a multipart form data post?

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.

What is multiple part 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).

How does multipart file work?

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.


1 Answers

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

like image 84
Chris Avatar answered Oct 21 '22 11:10

Chris