fix(read): allow reading base64 files from a dataURI scheme #2763
No reviewers
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2763
Loading…
Reference in New Issue
No description provided.
Delete Branch "gh-2762"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fixes #2762
I'm not if the modified files are source files that get compiled or those are the compiled files.
Also, can you point me to where should the test cases for those be?
The test should be added between line 690 and 691 in
test.js
: https://github.com/SheetJS/sheetjs/blob/master/test.js#L690-L691 (just after the "should read base64 strings" test)The media type is optional and the comma need not be escaped. Try
/^data:([^\/]+\/[^\/]+)?;base64,/
Include a test with a string like
The test snippet should use avoid const and any other ES6+ features.
@SheetJSDev
Thanks a lot for the detailed comment, I've pushed the necessary changes.