Skip to content

video upload issue fix in IOS#267

Open
BharathTa-kore wants to merge 9 commits into
v3/dev_oldfrom
v3/iosvid
Open

video upload issue fix in IOS#267
BharathTa-kore wants to merge 9 commits into
v3/dev_oldfrom
v3/iosvid

Conversation

@BharathTa-kore

@BharathTa-kore BharathTa-kore commented Nov 10, 2025

Copy link
Copy Markdown
Collaborator

Note

Detects iOS Safari and uploads videos via DataURL, reworks upload prep to use precomputed base64 (incl. chunking), and ensures componentSize is set for media files.

  • File uploader (src/plugins/fileUploader/multiFileUploader.ts):
    • iOS Safari handling:
      • Adds isSafariIOS() to detect Safari on iOS.
      • For video on iOS Safari, reads file via FileReader.readAsDataURL and sets recState.resulttype directly (avoids canvas path), then proceeds to token/upload.
    • Upload preparation:
      • prepareUploadConfig(...) now uses existing selectedFile.resulttype when present and branches correctly for chunked vs non-chunked uploads.
      • Falls back to reading base64 via FileReader.readAsDataURL to populate resulttype before upload when not already set.
    • Metadata consistency:
      • Ensures componentSize is set for image, video, and audio types to drive chunking decisions.

Written by Cursor Bugbot for commit 63cc3ac. Configure here.

@cursor cursor 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.

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;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

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.

2 participants