REST Multipart/Form-Data, Base64 JSON Payloads, GraphQL Uploads and Binary Streaming APIs Across 54 Formats: Questions and Answers

Engineering reference answering 100 distinct technical questions on designing and testing API endpoints that accept or return the 54 file formats via RFC 7578 multipart/form-data, raw binary bodies, Base64 JSON fields, and gRPC streams across all 54 file formats supported by SampleTestFiles.

Representative format hubs and diagnostic tools

Part 1: Document, spreadsheet and text format questions

1. Should an API endpoint accept .avro (Avro) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/avro; Base64-encoding .avro inside JSON inflates sample-avro-1kb.avro (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 4F 62 6A 01 signature.
2. Should an API endpoint accept .bin (BIN) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/octet-stream; Base64-encoding .bin inside JSON inflates sample-bin-1kb.bin (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the None signature.
3. Should an API endpoint accept .bmp (BMP) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/bmp; Base64-encoding .bmp inside JSON inflates sample-bmp-10kb.bmp (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 42 4D signature.
4. Should an API endpoint accept .css (CSS) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/css; Base64-encoding .css inside JSON inflates sample-css-1kb.css (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
5. Should an API endpoint accept .csv (CSV) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/csv; Base64-encoding .csv inside JSON inflates sample-csv-1kb.csv (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
6. Should an API endpoint accept .docx (DOCX) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; Base64-encoding .docx inside JSON inflates sample-docx-50kb.docx (51,200 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
7. Should an API endpoint accept .eml (EML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: message/rfc822; Base64-encoding .eml inside JSON inflates sample-eml-1kb.eml (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
8. Should an API endpoint accept .epub (EPUB) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/epub+zip; Base64-encoding .epub inside JSON inflates sample-epub-10kb.epub (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
9. Should an API endpoint accept .flac (FLAC) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: audio/flac; Base64-encoding .flac inside JSON inflates sample-flac-100kb.flac (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 66 4C 61 43 signature.
10. Should an API endpoint accept .geojson (GeoJSON) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/geo+json; Base64-encoding .geojson inside JSON inflates sample-geojson-1kb.geojson (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
11. Should an API endpoint accept .gif (GIF) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/gif; Base64-encoding .gif inside JSON inflates sample-gif-10kb.gif (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 47 49 46 38 39 61 signature.
12. Should an API endpoint accept .gltf (glTF) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: model/gltf+json; Base64-encoding .gltf inside JSON inflates sample-gltf-1kb.gltf (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
13. Should an API endpoint accept .gpx (GPX) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/gpx+xml; Base64-encoding .gpx inside JSON inflates sample-gpx-1kb.gpx (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
14. Should an API endpoint accept .gz (GZ) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/gzip; Base64-encoding .gz inside JSON inflates sample-gz-1kb.gz (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 1F 8B 08 signature.
15. Should an API endpoint accept .html (HTML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/html; Base64-encoding .html inside JSON inflates sample-html-1kb.html (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 3C 21 44 4F 43 54 59 50 45 signature.
16. Should an API endpoint accept .ico (ICO) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/vnd.microsoft.icon; Base64-encoding .ico inside JSON inflates sample-ico-10kb.ico (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 00 00 01 00 signature.
17. Should an API endpoint accept .ics (iCalendar) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/calendar; Base64-encoding .ics inside JSON inflates sample-ics-1kb.ics (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
18. Should an API endpoint accept .ini (INI) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/plain; Base64-encoding .ini inside JSON inflates sample-ini-1kb.ini (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
19. Should an API endpoint accept .jpg (JPG) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/jpeg; Base64-encoding .jpg inside JSON inflates sample-jpg-1kb.jpg (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the FF D8 FF signature.
20. Should an API endpoint accept .js (JavaScript) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/javascript, per RFC 9239; Base64-encoding .js inside JSON inflates sample-js-1kb.js (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
21. Should an API endpoint accept .json (JSON) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/json; Base64-encoding .json inside JSON inflates sample-json-1kb.json (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
22. Should an API endpoint accept .jsonl (JSONL) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/jsonl; Base64-encoding .jsonl inside JSON inflates sample-jsonl-1kb.jsonl (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
23. Should an API endpoint accept .kml (KML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.google-earth.kml+xml; Base64-encoding .kml inside JSON inflates sample-kml-1kb.kml (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
24. Should an API endpoint accept .log (LOG) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/plain; Base64-encoding .log inside JSON inflates sample-log-1kb.log (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
25. Should an API endpoint accept .m4a (M4A) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: audio/mp4; Base64-encoding .m4a inside JSON inflates sample-m4a-100kb.m4a (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 66 74 79 70 4D 34 41 20 at byte offset 4 signature.

Part 2: Image, audio, video, archive and 3D format questions

1. Should an API endpoint accept .md (Markdown) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/markdown; Base64-encoding .md inside JSON inflates sample-md-1kb.md (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
2. Should an API endpoint accept .mkv (MKV) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: video/x-matroska; Base64-encoding .mkv inside JSON inflates sample-mkv-100kb.mkv (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 1A 45 DF A3 signature.
3. Should an API endpoint accept .mov (MOV) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: video/quicktime; Base64-encoding .mov inside JSON inflates sample-mov-100kb.mov (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 66 74 79 70 71 74 20 20 at byte offset 4 signature.
4. Should an API endpoint accept .mp3 (MP3) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: audio/mpeg; Base64-encoding .mp3 inside JSON inflates sample-mp3-100kb.mp3 (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 49 44 33 signature.
5. Should an API endpoint accept .mp4 (MP4) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: video/mp4; Base64-encoding .mp4 inside JSON inflates sample-mp4-100kb.mp4 (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 66 74 79 70 at byte offset 4 signature.
6. Should an API endpoint accept .obj (OBJ) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: model/obj; Base64-encoding .obj inside JSON inflates sample-obj-1kb.obj (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
7. Should an API endpoint accept .ods (ODS) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.oasis.opendocument.spreadsheet; Base64-encoding .ods inside JSON inflates sample-ods-10kb.ods (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
8. Should an API endpoint accept .odt (ODT) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.oasis.opendocument.text; Base64-encoding .odt inside JSON inflates sample-odt-10kb.odt (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
9. Should an API endpoint accept .pdf (PDF) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/pdf; Base64-encoding .pdf inside JSON inflates sample-pdf-5kb.pdf (5,120 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 25 50 44 46 2D signature.
10. Should an API endpoint accept .png (PNG) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/png; Base64-encoding .png inside JSON inflates sample-png-1kb.png (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 89 50 4E 47 0D 0A 1A 0A signature.
11. Should an API endpoint accept .pptx (PPTX) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation; Base64-encoding .pptx inside JSON inflates sample-pptx-100kb.pptx (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
12. Should an API endpoint accept .rtf (RTF) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/rtf; Base64-encoding .rtf inside JSON inflates sample-rtf-1kb.rtf (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 7B 5C 72 74 66 31 signature.
13. Should an API endpoint accept .sql (SQL) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/sql; Base64-encoding .sql inside JSON inflates sample-sql-1kb.sql (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
14. Should an API endpoint accept .srt (SRT) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/x-subrip; Base64-encoding .srt inside JSON inflates sample-srt-1kb.srt (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
15. Should an API endpoint accept .stl (STL) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: model/stl; Base64-encoding .stl inside JSON inflates sample-stl-1kb.stl (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 73 6F 6C 69 64 signature.
16. Should an API endpoint accept .svg (SVG) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/svg+xml; Base64-encoding .svg inside JSON inflates sample-svg-1kb.svg (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 3C 73 76 67 signature.
17. Should an API endpoint accept .tar (TAR) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/x-tar; Base64-encoding .tar inside JSON inflates sample-tar-10kb.tar (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 75 73 74 61 72 at byte offset 257 signature.
18. Should an API endpoint accept .tiff (TIFF) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/tiff; Base64-encoding .tiff inside JSON inflates sample-tiff-10kb.tiff (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 49 49 2A 00 signature.
19. Should an API endpoint accept .toml (TOML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/toml; Base64-encoding .toml inside JSON inflates sample-toml-1kb.toml (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
20. Should an API endpoint accept .tsv (TSV) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/tab-separated-values; Base64-encoding .tsv inside JSON inflates sample-tsv-1kb.tsv (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
21. Should an API endpoint accept .txt (TXT) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/plain; Base64-encoding .txt inside JSON inflates sample-txt-1kb.txt (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the None signature.
22. Should an API endpoint accept .vtt (WebVTT) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: text/vtt; Base64-encoding .vtt inside JSON inflates sample-vtt-1kb.vtt (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 57 45 42 56 54 54 signature.
23. Should an API endpoint accept .wav (WAV) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: audio/wav; Base64-encoding .wav inside JSON inflates sample-wav-100kb.wav (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 52 49 46 46 ?? ?? ?? ?? 57 41 56 45 signature.
24. Should an API endpoint accept .webm (WebM) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: video/webm; Base64-encoding .webm inside JSON inflates sample-webm-100kb.webm (102,400 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 1A 45 DF A3 signature.
25. Should an API endpoint accept .webp (WebP) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: image/webp; Base64-encoding .webp inside JSON inflates sample-webp-10kb.webp (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 52 49 46 46 ?? ?? ?? ?? 57 45 42 50 signature.
26. Should an API endpoint accept .xlsx (XLSX) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; Base64-encoding .xlsx inside JSON inflates sample-xlsx-10kb.xlsx (10,240 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.
27. Should an API endpoint accept .xml (XML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/xml; Base64-encoding .xml inside JSON inflates sample-xml-1kb.xml (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 3C 3F 78 6D 6C signature.
28. Should an API endpoint accept .yaml (YAML) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/yaml; Base64-encoding .yaml inside JSON inflates sample-yaml-1kb.yaml (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the UTF-8 text signature.
29. Should an API endpoint accept .zip (ZIP) uploads as multipart/form-data, raw binary application/octet-stream, or Base64-encoded JSON?
Prefer RFC 7578 multipart/form-data or raw binary streaming with Content-Type: application/zip; Base64-encoding .zip inside JSON inflates sample-zip-1kb.zip (1,024 bytes) by ~33.3% and forces the API gateway to buffer the entire string in RAM before the endpoint checks the 50 4B 03 04 signature.

Part 3: Architecture, implementation and pipeline questions

1. How do I test a multipart/form-data .avro upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-avro-1kb.avro;type=application/avro" https://api.example.com/upload and verify the server checks the 4F 62 6A 01 magic bytes.
2. How do I test a multipart/form-data .bin upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-bin-1kb.bin;type=application/octet-stream" https://api.example.com/upload and verify the server checks the None magic bytes.
3. How do I test a multipart/form-data .bmp upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-bmp-10kb.bmp;type=image/bmp" https://api.example.com/upload and verify the server checks the 42 4D magic bytes.
4. How do I test a multipart/form-data .css upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-css-1kb.css;type=text/css" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
5. How do I test a multipart/form-data .csv upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-csv-1kb.csv;type=text/csv" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
6. How do I test a multipart/form-data .docx upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-docx-50kb.docx;type=application/vnd.openxmlformats-officedocument.wordprocessingml.document" https://api.example.com/upload and verify the server checks the 50 4B 03 04 magic bytes.
7. How do I test a multipart/form-data .eml upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-eml-1kb.eml;type=message/rfc822" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
8. How do I test a multipart/form-data .epub upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-epub-10kb.epub;type=application/epub+zip" https://api.example.com/upload and verify the server checks the 50 4B 03 04 magic bytes.
9. How do I test a multipart/form-data .flac upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-flac-100kb.flac;type=audio/flac" https://api.example.com/upload and verify the server checks the 66 4C 61 43 magic bytes.
10. How do I test a multipart/form-data .geojson upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-geojson-1kb.geojson;type=application/geo+json" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
11. How do I test a multipart/form-data .gif upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-gif-10kb.gif;type=image/gif" https://api.example.com/upload and verify the server checks the 47 49 46 38 39 61 magic bytes.
12. How do I test a multipart/form-data .gltf upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-gltf-1kb.gltf;type=model/gltf+json" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
13. How do I test a multipart/form-data .gpx upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-gpx-1kb.gpx;type=application/gpx+xml" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
14. How do I test a multipart/form-data .gz upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-gz-1kb.gz;type=application/gzip" https://api.example.com/upload and verify the server checks the 1F 8B 08 magic bytes.
15. How do I test a multipart/form-data .html upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-html-1kb.html;type=text/html" https://api.example.com/upload and verify the server checks the 3C 21 44 4F 43 54 59 50 45 magic bytes.
16. How do I test a multipart/form-data .ico upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-favicon.ico;type=image/vnd.microsoft.icon" https://api.example.com/upload and verify the server checks the 00 00 01 00 magic bytes.
17. How do I test a multipart/form-data .ics upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-ics-1kb.ics;type=text/calendar" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
18. How do I test a multipart/form-data .ini upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-ini-1kb.ini;type=text/plain" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
19. How do I test a multipart/form-data .jpg upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-jpg-1kb.jpg;type=image/jpeg" https://api.example.com/upload and verify the server checks the FF D8 FF magic bytes.
20. How do I test a multipart/form-data .js upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-js-1kb.js;type=text/javascript, per RFC 9239" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
21. How do I test a multipart/form-data .json upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-json-1kb.json;type=application/json" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
22. How do I test a multipart/form-data .jsonl upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-jsonl-1kb.jsonl;type=application/jsonl" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.
23. How do I test a multipart/form-data .kml upload from curl with an explicit part MIME type?
Run curl -X POST -F "file=@sample-kml-1kb.kml;type=application/vnd.google-earth.kml+xml" https://api.example.com/upload and verify the server checks the UTF-8 text magic bytes.

Part 4: Verification, edge cases and automation questions

1. What happens if a multipart boundary string accidentally appears inside an unescaped .avro payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .avro byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-avro-1kb.avro, the server splits the file prematurely.
2. What happens if a multipart boundary string accidentally appears inside an unescaped .bin payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .bin byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-bin-1kb.bin, the server splits the file prematurely.
3. What happens if a multipart boundary string accidentally appears inside an unescaped .bmp payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .bmp byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-bmp-10kb.bmp, the server splits the file prematurely.
4. What happens if a multipart boundary string accidentally appears inside an unescaped .css payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .css byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-css-1kb.css, the server splits the file prematurely.
5. What happens if a multipart boundary string accidentally appears inside an unescaped .csv payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .csv byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-csv-1kb.csv, the server splits the file prematurely.
6. What happens if a multipart boundary string accidentally appears inside an unescaped .docx payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .docx byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-docx-50kb.docx, the server splits the file prematurely.
7. What happens if a multipart boundary string accidentally appears inside an unescaped .eml payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .eml byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-eml-1kb.eml, the server splits the file prematurely.
8. What happens if a multipart boundary string accidentally appears inside an unescaped .epub payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .epub byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-epub-10kb.epub, the server splits the file prematurely.
9. What happens if a multipart boundary string accidentally appears inside an unescaped .flac payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .flac byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-flac-100kb.flac, the server splits the file prematurely.
10. What happens if a multipart boundary string accidentally appears inside an unescaped .geojson payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .geojson byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-geojson-1kb.geojson, the server splits the file prematurely.
11. What happens if a multipart boundary string accidentally appears inside an unescaped .gif payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .gif byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-gif-10kb.gif, the server splits the file prematurely.
12. What happens if a multipart boundary string accidentally appears inside an unescaped .gltf payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .gltf byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-gltf-1kb.gltf, the server splits the file prematurely.
13. What happens if a multipart boundary string accidentally appears inside an unescaped .gpx payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .gpx byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-gpx-1kb.gpx, the server splits the file prematurely.
14. What happens if a multipart boundary string accidentally appears inside an unescaped .gz payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .gz byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-gz-1kb.gz, the server splits the file prematurely.
15. What happens if a multipart boundary string accidentally appears inside an unescaped .html payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .html byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-html-1kb.html, the server splits the file prematurely.
16. What happens if a multipart boundary string accidentally appears inside an unescaped .ico payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .ico byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-favicon.ico, the server splits the file prematurely.
17. What happens if a multipart boundary string accidentally appears inside an unescaped .ics payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .ics byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-ics-1kb.ics, the server splits the file prematurely.
18. What happens if a multipart boundary string accidentally appears inside an unescaped .ini payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .ini byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-ini-1kb.ini, the server splits the file prematurely.
19. What happens if a multipart boundary string accidentally appears inside an unescaped .jpg payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .jpg byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-jpg-1kb.jpg, the server splits the file prematurely.
20. What happens if a multipart boundary string accidentally appears inside an unescaped .js payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .js byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-js-1kb.js, the server splits the file prematurely.
21. What happens if a multipart boundary string accidentally appears inside an unescaped .json payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .json byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-json-1kb.json, the server splits the file prematurely.
22. What happens if a multipart boundary string accidentally appears inside an unescaped .jsonl payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .jsonl byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-jsonl-1kb.jsonl, the server splits the file prematurely.
23. What happens if a multipart boundary string accidentally appears inside an unescaped .kml payload?
A compliant RFC 7578 multipart client generates a random boundary token absent from the .kml byte stream; if a custom client hardcodes a short boundary that collides with payload bytes inside sample-kml-1kb.kml, the server splits the file prematurely.

Explore all 40 topic-based technical format references

Browse the complete engineering reference library on Testing guides or Frequently asked questions.