-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: added docx types to binary #41200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded OpenXML MIME types (DOCX, XLSX, PPTX) to the binary data type set in RestAPIActivateUtils so responses with these content types are treated as binary (base64-encoded) with responseDataType set to BINARY. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant RestAPIActivateUtils
participant UpstreamAPI
Client->>UpstreamAPI: Execute REST request
UpstreamAPI-->>Client: HTTP response (Content-Type)
Client->>RestAPIActivateUtils: Process response
alt Content-Type in BINARY_DATA_TYPES (incl. OpenXML)
note over RestAPIActivateUtils: Classify as BINARY
RestAPIActivateUtils-->>Client: Base64-encoded body + responseDataType=BINARY
else Other types
note over RestAPIActivateUtils: Existing JSON/text/image handling
RestAPIActivateUtils-->>Client: Processed accordingly
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/17358029402. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (1)
167-171: Make binary detection robust to Content-Type parameters.Equality on
contentType.toString()fails if servers append params (e.g.,; charset=utf-8). Compare type/subtype only.- } else if (BINARY_DATA_TYPES.contains(contentType.toString())) { + } else if (BINARY_DATA_TYPES.contains(contentType.getType() + "/" + contentType.getSubtype())) {Follow-up (optional): model
BINARY_DATA_TYPESasSet<MediaType>and useanyMatch(contentType::isCompatibleWith).
🧹 Nitpick comments (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (1)
60-69: Use generics for BINARY_DATA_TYPES to avoid raw type.- public static final Set BINARY_DATA_TYPES = Set.of( + public static final Set<String> BINARY_DATA_TYPES = Set.of(
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: server-spotless / spotless-check
- GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/RestAPIActivateUtils.java (1)
65-68: OOXML MIME types correctly marked as binary — aligns with the issue’s goal.Treating DOCX/XLSX/PPTX as binary should prevent misclassification and fixes the SharePoint upload flow for standard OpenXML responses.
|
Deploy-Preview-URL: https://ce-41200.dp.appsmith.com |
|
Not merging the PR to keep the DP alive as it has been shared with the customer to try out the fix. |
|
Merging the PR as the user confirmed the fix is working on the DP |
Description
This PR adds certain docx types for appsmith to correctly identify them as Binary type.
Currently, appsmith detects these as Text type.
Fixes #41199
Media
Before

After

Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/17358026403
Commit: 01d5f2e
Cypress dashboard.
Tags:
@tag.SanitySpec:
Sun, 31 Aug 2025 14:32:30 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit