docbrown/app/javascript
Alex bc8c126497
Validate file uploads client-side (#6737)
* JavaScript MVP

- First round of linting
- Use for testing

* Add some default UI error handling

* Add file validation to updating profile image

* Add type validation and fix size bug

* Refactor and add file validation to article cover

* Add file validation to body images

* Add accept field to profile image form

* Add parseInt to maxFileSizeMb

* Add accept and max-file-size-mb to article images

* Change parseInt to Number

* Add file validations to podcast form

* Add accept image to podcasts

* Add file validation and accept field to org form

* Use appendChild for error message

* Add file validation to comment form

* Add JS Docs comments

* Remove redundant format check

* Add documentation to override default values

* Update documention (spelling, formatting, etc.)

* Update max-file-size-mb to 25

* Bump default max file size for images to 25

* Change appendChild to append

* Refactor remove error message

* Refactor JS, remove console logs, update error msg

* Remove video from permitted file types

* Update error messaging

* Update docs for funciton params...oops 🙈

* Fix file size check logic

- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array

* Add specs

* Change blackbox to black box

* Remove wait_for_javascript

* Remove comments from spec
2020-03-24 09:21:49 +01:00
..
.storybook Upgrade Storybook to 5.3.17 (#6754) 2020-03-23 09:46:50 -04:00
analytics Move Chart.js to dynamic import (#5576) [deploy] 2020-01-18 20:46:35 -05:00
article-form Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
articles Upgrade Storybook to 5.3.17 (#6754) 2020-03-23 09:46:50 -04:00
chat Fix /connect message composer style bugs (#6695) [deploy] 2020-03-18 11:19:04 -04:00
contentDisplayPolicy Migrate to streaming app shell via serviceworkers (#5020) [deploy] 2019-12-16 12:21:33 -05:00
designSystem/__stories__ Upgrade Storybook to 5.3.17 (#6754) 2020-03-23 09:46:50 -04:00
githubRepos [deploy] Remove github_repos from public API (#6304) 2020-02-26 11:23:39 -05:00
internal Internal bug fixes and misc JS/CSS cleanup (#6684) 2020-03-18 16:05:33 -05:00
leftSidebar Fix homepage back button flicker (#6688) [deploy] 2020-03-17 22:40:49 -04:00
listings Use correct attribute for rendering tags in listings (#6741) [deploy] 2020-03-21 11:46:23 +01:00
onboarding Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00
organization Refactored to use a common <OrganizationPicker /> component (#4470) 2019-10-24 17:27:16 -04:00
packs Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
podcasts Upgrade Storybook to 5.3.17 (#6754) 2020-03-23 09:46:50 -04:00
profileDropdown Chat: Remove Report Button from user's own profile sidebar (#4604) [deploy] 2019-12-02 16:35:47 -05:00
readingList Refactor debounce usage into debounceAction util (#6506) 2020-03-09 17:38:39 -04:00
searchableItemList fix totalCount getting an array instead of a number (#5359) 2020-01-09 09:47:55 -05:00
shared/components Remove debouncing from Tags component to fix glitching in autocompletion (#6598) [deploy] 2020-03-20 18:18:05 +01:00
sidebar-widget Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00
src Upgrade Storybook to 5.3.17 (#6754) 2020-03-23 09:46:50 -04:00
utilities/__tests__ [deploy] Made changes to timeAgo function for Preact component usage. (#6083) 2020-02-17 10:04:38 -05:00
.eslintrc.js fixed some eslint errors (#6521) 2020-03-10 18:49:57 +01:00