Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disadvantage of using multipart form

I was wondering if there is any disadvantage of adding enctype="multipart/form-data" to a form when there's no file input field.

I declare the form in a template and I only need multipart on some pages. Should I always add it or only when I need it?

Will the request be bigger? Or are there any other consequences (except for decreased readability in Firebug / DevTools)?

like image 934
Thomas Avatar asked Jul 19 '12 09:07

Thomas


People also ask

Why we use Enctype multipart form data?

Multipart form data: The ENCTYPE attribute of <form> tag specifies the method of encoding for the form data. It is one of the two ways of encoding the HTML form. It is specifically used when file uploading is required in HTML form. It sends the form data to server in multiple parts because of large size of file.

Is multipart form data safe?

Our security department, recently, informed us we should stop and avoid to use the content type 'multipart/form-data' in order to send a file to a web server, because it is not considered 'safe'.

What is multi part forms?

Multipart or multi-part stationery is paper that is blank, or preprinted as a form to be completed, comprising a stack of several copies, either on carbonless paper or plain paper interleaved with carbon paper.

How does multipart form data work?

Multipart/form-data is one of the most used enctype/content type. In multipart, each of the field to be sent has its content type, file name and data separated by boundary from other field. No encoding of the data is necessary, because of the unique boundary. The binary data is sent as it is.


1 Answers

Will the request be bigger?

Slightly.

Or are there any other consequences (except for decreased readability in Firebug / DevTools)?

No.

like image 60
Quentin Avatar answered Oct 12 '22 12:10

Quentin