Skip to content

feat(tus): add Upload-Metadata header to TUS requests#1795

Merged
JoshuaMoelans merged 2 commits into
masterfrom
jpnurmi/feat/tus/attachment-type
Jun 5, 2026
Merged

feat(tus): add Upload-Metadata header to TUS requests#1795
JoshuaMoelans merged 2 commits into
masterfrom
jpnurmi/feat/tus/attachment-type

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented Jun 5, 2026

Add metadata header to TUS creation (POST) and upload (PATCH) requests:

Upload-Metadata: `sentry <base64({"attachment_type":"<type>"})>

Testing:

> PATCH /api/4506178389999616/upload/019e96908b507902972f06b45a439cda/?length=1000000000&signature=YXFNYnv3TBKLaRby0uo7GFuuundlJ-9TdcGNiyEeGkb8ufFPZkio3s7NR_0qZHYNt14hYQN568cwwQsApTfKAQ.eyJ0IjoiMjAyNi0wNi0wNVQwNjo1NToxNS43OTIwNzMwMzVaIn0 HTTP/2
Host: o447951.ingest.us.sentry.io
User-Agent: sentry.native/0.14.2
Accept: */*
x-sentry-auth:Sentry sentry_key=d545f4da00ff7b2fa7b6c8620c94a4e9, sentry_version=7, sentry_client=sentry.native/0.14.2
tus-resumable:1.0.0
content-type:application/offset+octet-stream
upload-offset:0
upload-metadata:sentry eyJhdHRhY2htZW50X3R5cGUiOiJldmVudC5hdHRhY2htZW50In0=
Content-Length: 1000000000

* upload completely sent off: 1000000000 bytes
$ base64 -d <<<"eyJhdHRhY2htZW50X3R5cGUiOiJldmVudC5hdHRhY2htZW50In0="
{"attachment_type":"event.attachment"}

https://sentry-sdks.sentry.io/issues/7528989067

See also:

Add the `Upload-Metadata` header to TUS creation (POST) and upload
(PATCH) requests in the `sentry <base64({"attachment_type":"<type>"})>`
format that the relay server expects for preliminary quota checks.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2d21a1f

@JoshuaMoelans JoshuaMoelans merged commit 065d610 into master Jun 5, 2026
65 checks passed
@JoshuaMoelans JoshuaMoelans deleted the jpnurmi/feat/tus/attachment-type branch June 5, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants