You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: validates file extension before uploading files (#1281)
* using appSetting in FileUploadPreview to know if file type is in blocked types list in appSetting
* completed naive implementation of permitted file/image types
* fix: reimplemented supported attachment types to use response from server rather than appSettings
* feat:supported image and file attachment state via backend response
* feat: check if file/image is supported using appSettings
* fix: move all styles from components to StyleSheet
* fix: moved appSettings to InputMessageInputContextValue
* fix: removed else block
* Debugging image upload when file type is not supported
* refactor: removes active state from upload indicator
* refactor: extracts adding file states to a function
This lets us easier reuse the function rather than copy every time
* refactor: simplifies error handling after image upload
* Revert "Revert "feat: add appSettings to ChatContext (#1262)""
This reverts commit 450ef9d.
* fix: improved code readability
* style: improved code readability, unsupport File and text warning moved to components of their own and text added to i18n
* style: applies autolint fixes
* test: add missing testIDs
* fix: UnsupportedImageTypeIndicator displays on Error & keys added to i18n
* style: resolved linter errors
* fix: added appSettings to required components
* style: fixed types errors
* fix: not supported i18n keys
* fix: not supported i18n keys added again and fixed lost keys
* fix: removed Irrelevant test
* fix: put required test back and fixed test
* fix: test description
* fix: updated tests snapshot
* fix: removed unnecessary logs
* fix: fixes concerning code-review from Mads
* Fixes after first code-review with Mads & steve
Removed appSettings from components and contexts where it was not needed
Improved warning icon styling
Refactored uploadNewFile and uploadNewImage function to run
sequentially to avoid logical errors
* style: chnages variable name for search in blocked files and images list
* fix: checks mime types to know if file is blocked
* fix: upload-progress-indicator components tests written for the four possible states
* fix: removed appSettings from useCreateMessageInputContext hook
* fix: Recovered lost translations
* fix: refactored how list of blocked file/image/mime types are gotten from appSettings
* refactor: handling image and file uploads errors in on function
* refactor: removed white color from close icon
* fix: updated test snapshots
* fix: use relative positioning rather than absolute positioning in styling
* fix: extract tenaries to variables
* fix: fixed linting issue
* fix: refactor functions to get file and image config from appSettings
* fix: update variable name that indicates boolean to indicate file and image state rathar
* fix: add correc typing to indicator map to improve maintainability
* fix: remove array from unsupported view
* fix: rectify indicatorStates type
* fix: again, rectify indicatorStates by remove string and adding ProgressIndicatorState as value in type def
* fix: resolve file upload state bug for not supported file types
* fix: remove appSettings from fileuploadpreview component
* fix: test for unsupported state in imageuploadpreview component
* fix: test for unsupported state in fileuploadpreview component
* fix: update test snapshot
* fix: add better typing to indicatior type function
* fix: linting fix
* fix: remove unneeded reassignment
* fix: remove unneeded rerender function calls and snapshot
* fix: update snapshot
* fix: removed unneeded exports
* fix: give more descriptive variable names
* fix: lint fix
* fix: remove unnecessary exports and refactor indicatortype function
* fix: refactor casting
* fix: removed casting and renamed function
* fix: refactor mapFileState function
* fix: give more descriptive variable names
* fix: extract icon size to variable
* fix: use arrow function expression for consistency
Co-authored-by: Mads Røskar <[email protected]>
Co-authored-by: Mads Røskar <[email protected]>
Co-authored-by: Nwagba Okechukwu <[email protected]>
0 commit comments