Download multipart file from request
GET/v2/endpoints/:endpoint/requests/:requestId/multipart/download
Downloads a file attachment from a multipart/form-data request. This endpoint retrieves the actual file content that was uploaded as part of a request.
Purpose
Use this endpoint to:
- Retrieve files uploaded via multipart requests
- Download attachments for inspection or analysis
- Export uploaded files for testing or compliance
- Verify file contents match expected uploads
How It Works
When a multipart/form-data request is received by Beeceptor:
- File metadata (field name, file name, content type, size) is stored with the request log
- File content is stored separately in binary format
- The request history shows file metadata but not content (to keep responses manageable)
- This endpoint retrieves the actual file content
Required Parameters
Both query parameters are required to identify the specific file:
fieldName: The name of the form field containing the file
- Must match the
nameattribute in the multipart form - Example: For
<input type="file" name="document">, usefieldName=document
component: Where the file was captured
Request: File from the incoming client requestCalloutRequest: File forwarded to an upstream proxy target
Response
Returns the raw file content with appropriate headers:
Content-Type: Original MIME type of the uploaded fileContent-Disposition: Attachment with original filenameContent-Length: File size in bytes
Finding File Information
To identify which files are available for a request:
- Call GET
/requests/{requestId}(returns verbose format) - Check
request.multipartDataarray for file metadata - Use
fieldNameandfileNamefrom the metadata
Limitations
- Only files (not text fields) can be downloaded
- File must exist in the request's multipart data
- Files are retained for the same duration as request history (up to 10 days)
- Maximum file size depends on subscription plan
Use Cases
- Debugging File Uploads: Verify uploaded files match expectations
- Compliance Auditing: Review files submitted through your API
- Test Verification: Confirm test files were received correctly
- Data Export: Extract files for external analysis tags: [Request History]
Request
Responses
- 200
- 400
- 401
- 404
File downloaded successfully
Bad Request - Missing required query parameters (fieldName or component)
Unauthenticated - API key is missing or invalid.
Not Found - The requested resource does not exist.