Skip to content

docs: require content length for attachment uploads#20

Merged
roshanjonah merged 1 commit into
mainfrom
agent/content-length-docs
Jul 8, 2026
Merged

docs: require content length for attachment uploads#20
roshanjonah merged 1 commit into
mainfrom
agent/content-length-docs

Conversation

@roshanjonah

Copy link
Copy Markdown
Member

Summary

  • Document exact Content-Length requirements for Sending binary attachment uploads
  • Update the Sending OpenAPI snapshot and generated Postman collection
  • Add a changelog entry for the attachment upload contract/tooling update

Verification

  • npm run postman:check
  • npm run confidentiality:check
  • npm run external-links:check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d09d9396b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread guides/attachments.mdx
```

The response includes an `upload_url` and required `headers`. Send a `PUT` request to that URL with the exact file bytes and returned headers. The upload token can write only that attachment, expires quickly, and does not grant send access.
The response includes an `upload_url` and required `headers`, including `Content-Type` and exact `Content-Length`. Send a `PUT` request to that URL with the exact file bytes and returned headers. The upload token can write only that attachment, expires quickly, and does not grant send access.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify browser handling for Content-Length

Because this delegated-upload section explicitly includes browsers, telling clients to send the returned headers including Content-Length gives browser callers an instruction they cannot follow: Fetch/XHR treats Content-Length as a forbidden request header, so a browser implementation that copies these headers cannot set it directly and may either drop it or fail validation. Please separate browser guidance from shell/agent guidance, e.g. tell browsers to use a Blob/File body and let the user agent supply the length while only setting the allowed returned headers.

Useful? React with 👍 / 👎.

@roshanjonah roshanjonah merged commit 73155f6 into main Jul 8, 2026
1 of 2 checks passed
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.

1 participant