diff --git a/develop-docs/sdk/telemetry/attachments.mdx b/develop-docs/sdk/telemetry/attachments.mdx index 6617854595626..ea79d38e58069 100644 --- a/develop-docs/sdk/telemetry/attachments.mdx +++ b/develop-docs/sdk/telemetry/attachments.mdx @@ -185,14 +185,27 @@ SDKs **SHOULD** send placeholders in the same envelope as the event the file is **Workflow:** 1. If an attachment is larger than ~100 MiB, upload it to the [TUS](https://tus.io/protocols/resumable-upload#creation-with-upload)-conformant upload endpoint (requires feature `projects:relay-upload-endpoint`): - ```shell - curl -X POST https://o0.ingest.sentry.io/api/0/upload/ \ - --header "Tus-Resumable: 1.0.0" \ - --header "Content-Type: application/offset+octet-stream" \ - --header "Upload-Length: ${FILE_SIZE}" \ - --data @myfile.log - ``` -2. Upon successful upload, attach a placeholder item to the event envelope, using the `Location` header from the upload response. + 1. Create the upload: + ```shell + curl -X POST https://o0.ingest.sentry.io/api/0/upload/ \ + --header "Tus-Resumable: 1.0.0" \ + --header "Upload-Length: ${FILE_SIZE}" \ + ``` + 1. Get the location response header: + ``` + HTTP/1.1 201 Created + Location: https://o0.ingest.sentry.io/api/0/upload/24e533e02ec3bc40c387f1a0e460e216/ + Tus-Resumable: 1.0.0 + ``` + 1. Upload the file: + ```shell + curl -X PATCH https://o0.ingest.sentry.io/api/0/upload/24e533e02ec3bc40c387f1a0e460e216/ \ + --header "Tus-Resumable: 1.0.0" \ + --header "Content-Type: application/offset+octet-stream" \ + --header "Upload-Offset: 0" \ + --data @myfile.log + ``` +1. Upon successful upload, attach a placeholder item to the event envelope, using the `Location` header from the upload response.