Uploads
Upload files (screenshots, logs, videos, save states) to attach to bug reports. The flow is two-step: first create an upload record to get a pre-signed URL, then PUT the binary directly to cloud storage.
Endpoint
POST /v1/ingest/uploads
Request body
| Field | Type | Required | Description |
|---|---|---|---|
sessionId | string (UUID) | Yes | Session this upload belongs to |
attachmentType | string | Yes | One of: screenshot, video, save_state, log_bundle, other |
fileName | string | Yes | Original file name, e.g. "crash-log.txt" |
mimeType | string | No | MIME type, e.g. "image/png", "text/plain" |
sizeBytes | number | No | File size in bytes (minimum 0) |
Response
| Field | Type | Description |
|---|---|---|
uploadId | string (UUID) | Upload record identifier — use this in the bug report |
storageKey | string | Internal storage key |
uploadUrl | string | Pre-signed URL — PUT the binary here |
publicUrl | string or null | Public URL after upload completes (may be null until processed) |
expiresAt | string (ISO 8601) | When the pre-signed URL expires |
requiredHeaders | object | Headers you must include in the PUT request |
Upload flow
Examples
Step 1 — Create upload record
curl -X POST \
-H "Authorization: Bearer flg_your_token" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "f47ac10b-...",
"attachmentType": "screenshot",
"fileName": "bug-screenshot.png",
"mimeType": "image/png",
"sizeBytes": 245760
}' \
https://ingest.forgelogger.dev/v1/ingest/uploads
Response:
{
"uploadId": "d290f1ee-...",
"storageKey": "uploads/2026/04/d290f1ee-bug-screenshot.png",
"uploadUrl": "https://storage.googleapis.com/bucket/uploads/...?X-Goog-Signature=...",
"publicUrl": null,
"expiresAt": "2026-04-08T15:30:00.000Z",
"requiredHeaders": {
"Content-Type": "image/png"
}
}
Step 2 — Upload the binary
curl -X PUT \
-H "Content-Type: image/png" \
--data-binary @bug-screenshot.png \
"https://storage.googleapis.com/bucket/uploads/...?X-Goog-Signature=..."
Step 3 — Reference in bug report
Include the uploadId in the report’s attachments array:
{
"sessionId": "f47ac10b-...",
"report": { "title": "Visual glitch on bridge" },
"attachments": [
{
"uploadId": "d290f1ee-...",
"attachmentType": "screenshot",
"fileName": "bug-screenshot.png",
"mimeType": "image/png",
"sizeBytes": 245760
}
]
}
Notes
- The pre-signed URL expires — check
expiresAtand upload promptly. - Include all
requiredHeadersin the PUT request or the upload will fail. - The maximum number of attachments per bug report is 50.
- Supported attachment types:
screenshot,video,save_state,log_bundle,other.