A developer uses the 'multipart/form-data' Content-Type for file uploads. Why is this required instead of 'application/x-www-form-urlencoded'?
- A.Binary file data would triple in size under percent-encoding: multipart/form-data instead uses a boundary string, and browsers always apply transparent compression (gzip-level) to offset this overhead
- B.Binary file data cannot be URL-encoded efficiently; multipart/form-data separates each field (including file contents and metadata) into distinct sections with a boundary delimiter, allowing binary data to be transmitted accurately
- C.application/x-www-form-urlencoded caps each field at 255 bytes (a hard limit in most server parsers), and file uploads always exceed that; multipart/form-data is the only format with no size ceiling
- D.Percent-encoding always corrupts null bytes and other control characters found in binary formats like JPEG headers (stripping them during decode): multipart/form-data avoids this by keeping each part's bytes in a separate, untouched section of the body
Why B is correct