-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow all filetypes to be uploaded #18521
Conversation
@fedirjh @neil-marcellini One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Woops sorry guys this isn't ready yet. |
|
Web & desktop screen recordings added. Working on mobile next. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates
@rushatgabhane can you please do that tests and complete the checklist? thanks! |
Reviewer Checklist
Screenshots/VideosDesktopScreen.Recording.2023-05-16.at.22.59.30.moviOSScreen.Recording.2023-05-16.at.23.03.18.movAndroidScreen.Recording.2023-05-16.at.23.06.50.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@youssef-lr LGMT!
Verified that blacklisted extensions show correct error message.
Verified that large file upload shows correct error message.
Verified that HEIC is converted to JPEG and upload on iOS.
Verified that GIF preserves it's "play" effect.
Verified that password protected PDFs work as expected.
PDF, and Images upload and download as expected.
@@ -35,7 +35,62 @@ const CONST = { | |||
|
|||
API_ATTACHMENT_VALIDATIONS: { | |||
// Same as the PHP layer allows | |||
ALLOWED_EXTENSIONS: ['webp', 'jpg', 'jpeg', 'png', 'gif', 'pdf', 'html', 'txt', 'rtf', 'doc', 'docx', 'htm', 'tiff', 'tif', 'xml', 'mp3', 'mp4', 'mov'], | |||
/* eslint-disable-next-line max-len */ | |||
UNALLOWED_EXTENSIONS: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB (pls freely ignore) : Is Unallowed even a word? I'd name it as disallowed / blacklisted
UNALLOWED_EXTENSIONS: [ | |
BLACKLISTED_EXTENSIONS: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Unallowed even a word?
I'm gonna go ahead and merge as we really need this live asap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallowed would also work, but we try to stay away from the blacklist/whitelist terms because of racial connotations.
…upload Allow all filetypes to be uploaded (cherry picked from commit d34ed34)
…-18521 🍒 Cherry pick PR #18521 to staging 🍒
🚀 Cherry-picked to staging by https://github.com/youssef-lr in version: 1.3.14-12 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Details
Fixed Issues
$ #11189
Tests
Helpful for testing: https://file-examples.com/
jpeg/jpg
,png
,tiff
.gifs
do not lose animation when uploaded..webp
images works as expected.HEIC/HEIF
images display them as links, as we do not currently support converting them neither in App nor in the backend.application/octet-stream
works as expected and a thumbnail is displayed.How HEIC images and links should be displayed:
When uploading images from iOS, including HEIC, they should all be displayed as images as iOS automatically converts them to JPEG.
Offline tests
Not applicable.
QA Steps
Helpful for testing: https://file-examples.com/
jpeg/jpg
,png
,tiff
.gifs
do not lose animation when uploaded..webp
images works as expected.HEIC/HEIF
images display them as links, as we do not currently support converting them neither in App nor in Web-PDF. Ideally we should create a follow up issue to support this.application/octet-stream
works as expected and a thumbnail is displayed.How HEIC images and links should be displayed:
When uploading images from iOS, including HEIC, they should all be displayed as images as iOS automatically converts them to JPEG.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-16.at.15.10.41.mov
Mobile Web - Chrome
Mobile Web - Safari
RPReplay_Final1684249237.mov
Desktop
Screen.Recording.2023-05-16.at.15.16.36.mov
iOS
Android