# Created on savesnippets.com ยท https://savesnippets.com/p7x9gFAdo9takk # Single file curl -F "avatar=@/tmp/me.jpg" \ -F "user_id=42" \ -H "Authorization: Bearer $TOKEN" \ https://api.example.com/users/42/avatar # Multiple files at once curl -F "files[]=@photo1.jpg" \ -F "files[]=@photo2.jpg" \ -F "album=Vacation" \ https://api.example.com/photos # Specify content type and filename curl -F "file=@/tmp/data.json;type=application/json;filename=report.json" \ https://api.example.com/upload