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

FieldTypeRequiredDescription
sessionIdstring (UUID)YesSession this upload belongs to
attachmentTypestringYesOne of: screenshot, video, save_state, log_bundle, other
fileNamestringYesOriginal file name, e.g. "crash-log.txt"
mimeTypestringNoMIME type, e.g. "image/png", "text/plain"
sizeBytesnumberNoFile size in bytes (minimum 0)

Response

FieldTypeDescription
uploadIdstring (UUID)Upload record identifier — use this in the bug report
storageKeystringInternal storage key
uploadUrlstringPre-signed URL — PUT the binary here
publicUrlstring or nullPublic URL after upload completes (may be null until processed)
expiresAtstring (ISO 8601)When the pre-signed URL expires
requiredHeadersobjectHeaders 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 expiresAt and upload promptly.
  • Include all requiredHeaders in 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.