Fix failed to load pdf when the file name contains accented character#50043
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-10-02_15.51.50.mp4Android: mWeb Chromeandroid-chrome-2024-10-02_15.52.41.mp4iOS: Nativeios-app-2024-10-02_15.43.27.mp4iOS: mWeb Safariios-safari-2024-10-02_15.45.00.mp4MacOS: Chrome / Safaridesktop-chrome-2024-10-02_15.39.21.mp4MacOS: Desktopdesktop-app-2024-10-02_15.47.28.mp4 |
I don't know if you meant to link to a PDF here? It would be good to give an example filename, I think! |
|
Oops, updaated |
|
@bernhardoj It looks like the accent disappears in the filename, both initially before the preview renders in-chat, and when downloading the file. |
|
It's because of this clean file name function. App/src/libs/fileDownload/FileUtils.ts Lines 153 to 155 in 3946b22 Notice that there is an underscore next to the |
|
✋ 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 staging by https://github.com/neil-marcellini in version: 9.0.44-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.44-12 🚀
|

Details
If the file name contains accented characters, then the load will fail.
Fixed Issues
$ #49449
PROPOSAL: #49449 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Ragù.alla.bolognese.-.updated.recipe_20.April.2023.pdf
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4