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
fix: REST API multimedia file upload issue fixed #32921
Conversation
WalkthroughWalkthroughThis set of changes introduces support for binary data handling in various components of the application, including the API editor and server-side utilities. It involves adding new content types, enhancing UI components for file uploads, and improving data parsing capabilities to handle binary and base64-encoded files effectively. Changes
Possibly related issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (6)
Additional comments not posted (8)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8830816864. |
Deploy-Preview-URL: https://ce-32921.dp.appsmith.com |
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.
LGTM
@sneha122 this change needs a documentation update as Can you please inform the documentation team about the same. |
@NilanshBansal Yes I will be informing them about this change |
Thanks! I just need to update to the latest then? |
@PrasannaPtools Hi are you using self hosted version of appsmith? If yes you will have to wait for next update, post that you can update your version. I can inform you once that upgrade happens. |
Hi Sneha,
We are self hosted, and that sounds good. I just updated mine to
version v1.22.1. Let me know when the next update is available!
Best Regards,
Prasanna Thuraisingam
…On Tue, 30 Apr 2024 at 03:45, sneha122 ***@***.***> wrote:
@PrasannaPtools <https://github.com/PrasannaPtools> Hi are you using self
hosted version of appsmith? If yes you will have to wait for next update,
post that you can update your version. I can inform you once that upgrade
happens.
—
Reply to this email directly, view it on GitHub
<#32921 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHYGOCZMIYH2F34YD2BRAZ3Y75DZ7AVCNFSM6AAAAABGW3RX5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGYYTGMZSHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description
If we use REST API action and file picker widget to upload any multimedia files (image, audio, video, pdf, xlsx), The file upload would be successful but file would get corrupted upon uploading. This was happening because file picker widget encodes this file to base64 format, and we were uploading this same base64 string using REST API url. Instead we should have decoded this base64 and then uploaded the file to retain the original contents of the file.
This PR fixes that issue by adding a new tab in body of the REST API action called
binary
, once we select this tab, we get autogenerated header forContent-Type: application/octet-stream
, in this binary input field we can then provide base64 encoded file contents, the server then decodes the contents before triggering the respective REST API and uploading the file.Steps to test the issue
Base64
Fixes #32378
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8844375718
Commit: 3316290
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Tests
Bug Fixes