mattermost-mobile-upstream/app/components/post_draft/uploads/upload_item
Jesse Hallam 876af76f36
[MM-69129] Prevent crash on nameless attachment (#10091)
* [MM-69129] Prevent crash on nameless attachment.

A draft attachment persisted without a name or an extension made
`isImage` call `extractExtension(undefined)`, throwing on every render of
the channel and of the global Drafts screen. Guard against it so the
draft renders as a plain file card that the user can remove.

* [MM-69129] Exercise the upload item tests against the real file utils

Both suites stubbed `isImage` and `getFormattedFileSize`, which are pure
functions, so they asserted states the component can never see and could
not have caught this crash. Drop the mocks and let each fixture decide
which branch renders.
2026-08-24 12:10:59 -03:00
..
upload_item_wrapper.test.tsx [MM-69129] Prevent crash on nameless attachment (#10091) 2026-08-24 12:10:59 -03:00
upload_item_wrapper.tsx Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
upload_remove.test.tsx Ability to show quick action and add files to edit post (#8926) 2025-06-25 16:04:08 +05:30
upload_remove.tsx (Android) Common component for upload item for main application and share extension (#9028) 2025-09-11 12:54:54 +05:30
upload_retry.tsx MM-64415 Attachment style updated for draft and Edit post screen (#8961) 2025-07-07 16:24:27 +05:30