video upload issue fix in IOS#267
Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Comment @cursor review or bugbot run to trigger another review on this PR
| me.acceptFileRecording(selectedFile); | ||
| } | ||
| return; | ||
| } |
There was a problem hiding this comment.
Bug: Double Prefix Corrupts Data URLs
When selectedFile.resulttype is already set from convertFiles (for images and non-Safari iOS videos), it contains a full data URL with prefix like "data:image/png;base64,..." from getDataURL(). This value is preserved and later used in onFileToUploaded where it's concatenated with another prefix, creating a malformed data URL like "data:video/mp4;base64,data:image/png;base64,..." for the fileContentBase64 field. The fix should strip the prefix from resulttype when it's already a complete data URL, or handle it consistently across all file types.
b767ab6 to
c93a560
Compare
2221b5e to
27805ac
Compare
Note
Detects iOS Safari and uploads videos via DataURL, reworks upload prep to use precomputed base64 (incl. chunking), and ensures
componentSizeis set for media files.src/plugins/fileUploader/multiFileUploader.ts):isSafariIOS()to detect Safari on iOS.videoon iOS Safari, reads file viaFileReader.readAsDataURLand setsrecState.resulttypedirectly (avoids canvas path), then proceeds to token/upload.prepareUploadConfig(...)now uses existingselectedFile.resulttypewhen present and branches correctly for chunked vs non-chunked uploads.FileReader.readAsDataURLto populateresulttypebefore upload when not already set.componentSizeis set forimage,video, andaudiotypes to drive chunking decisions.Written by Cursor Bugbot for commit 63cc3ac. Configure here.