http -f POST https://api.example.com/upload file@photo.jpg
Send a multipart form upload with HTTPie
Uploads photo.jpg as a multipart/form-data request, the encoding browsers use for file fields. The -f flag switches HTTPie from JSON to form encoding, and file@ names a file to attach. Add other fields as plain key=value arguments.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.