update document-picker package to support the file protocol#31499
Conversation
| }) | ||
| .then((blob) => { | ||
| const file = new File([blob], cleanFileName(fileName), {type: blob.type}); | ||
| const file = new File([blob], cleanFileName(fileName), {type: blob.type || type}); |
There was a problem hiding this comment.
What's this change for? blob doesn't return type in updated version?
There was a problem hiding this comment.
I tested and confirmed that type isn't returned in old version as well.
So what exactly does this change fix?
There was a problem hiding this comment.
For only the files which does have Space in their name, as you told upload failing for files which does have space init, after some digging type is the issue for the files which does have the space.
There was a problem hiding this comment.
Nice! But I said it's out of scope as it already happens on main and has different root cause.
Let's just fix crash here.
There was a problem hiding this comment.
oh, ok then. Fine. Will update the code to just have the fix.
situchan
left a comment
There was a problem hiding this comment.
update version to latest (9.0.1)
|
@situchan Updated the code to according to your changes. Please check! |
|
@b4s36t4 performance tests failing. Please pull main |
|
Still failing. I don't see any other recent PRs failing that test. |
|
I'm checking, but I don't see any change in my that's causing the issue. |
|
@situchan can you check if these tests are working fine on local in |
|
The error is coming from |
|
@situchan Fixed. |
|
@b4s36t4 please add one more test condition - File name should not have space when choosing from document picker |
Reviewer Checklist
Screenshots/VideosThe change doesn't affect non-native platforms (web/desktop/mWeb) Android: Nativeandroid.movAndroid: mWeb ChromeiOS: Nativeios.moviOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
@marcochavezf I think we should create new GH to fix file name with space issue (#29788 (comment)) |
Ah for this issue ^, what's the exact problem? I tried to upload for scan a file with a space in the name but I didn't have the error:
|
That only happens on android. |
|
With android, if the filename have a space in the name, it's not returning the type of the file which we're trying to get using Tested and it's working fine as well. |
|
@situchan @marcochavezf Updated the test condition. |
@b4s36t4 ah sorry which test condition? |
#31499 (comment) for QA team to test properly as it will fail with spaced name on android |
|
Snyk checks are failing, asking how to proceed here |
It's known - https://expensify.slack.com/archives/C01GTK53T8Q/p1700498232891239 |
|
Ok, given that we're just updating a package library to fix a bug it should be fine, thanks guys! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.6-2 🚀
|


Details
Updates the
react-native-document-pickerto solve the issue with Android file download local files.Fixed Issues
$ #29788
PROPOSAL: #29788 (comment)
Tests
Important
Be on Low network if possible
File name should not have space when choosing from document picker
Offline tests
Same as above.
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
ios.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4