docbrown/app/views
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
..
additional_content_boxes Refactor ProfileImage (#5803) 2020-02-07 08:56:16 -05:00
admin/application Last general linting sweep (#1947) 2019-03-02 07:47:14 -08:00
api/v0 Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00
articles Fix collection order with cross posted articles (#6768) [deploy] 2020-03-23 16:05:32 +01:00
badges Added title attribute for Badges (#5201) 2019-12-27 10:40:29 -05:00
blocks Add SRI to script tags where applicable (#2153) 2019-03-22 14:14:59 -04:00
chat_channels Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
classified_listings Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
comments Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
credits Add new font and theme config, plus new navbar config option (#4462) 2019-10-24 08:38:46 -04:00
dashboards Lower the minimum number of page views (#6728) 2020-03-20 10:26:59 -04:00
devise Allow communities to dictate authentication providers (#6639) [deploy] 2020-03-18 16:41:39 -04:00
doorkeeper add styling for oauth page (#4108) 2019-09-25 12:00:45 -07:00
downloads Add android and ios apps download page (#3736) (#3798) 2019-08-22 21:04:58 -04:00
email_subscriptions Fix linting issues in app/views/email_subscriptions (#1859) [ci skip] 2019-02-25 12:50:41 -05:00
events Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
feedback_messages Consistently use cache_key_heroku_slug (#6495) 2020-03-06 16:35:35 -05:00
fields Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
followings Move followings to internal API (#6494) 2020-03-06 19:33:26 +01:00
github_repos [deploy] Remove github_repos from public API (#6304) 2020-02-26 11:23:39 -05:00
homepage Stories views reorganization (#1317) 2018-12-13 14:54:02 -05:00
html_variants Campaign settings (#6141) [deploy] 2020-02-18 11:02:09 -06:00
internal Create primary_sticker_image_url in SiteConfig (#6746) [deploy] 2020-03-23 14:55:18 -04:00
layouts Add response templates for internal usage (#6676) 2020-03-20 11:32:55 -04:00
liquid_embeds Fix style issues on liquid tag embed page (#6445) [deploy] 2020-03-04 10:40:34 -05:00
liquids Allow KaTeX to render inline (#6670) [deploy] 2020-03-17 10:42:41 +01:00
mailers handle a missing commentable in new reply email (#6792) [deploy] 2020-03-23 16:40:51 -05:00
moderations Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
notifications CSS cleanups (#6274) [deploy] 2020-02-28 07:39:09 -06:00
onboardings Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
organizations Remove Unused JS file and Algolia References (#6750) [deploy] 2020-03-20 16:33:15 -05:00
pages New colors (#6650) 2020-03-19 15:34:09 -04:00
partnerships Consistently use cache_key_heroku_slug (#6495) 2020-03-06 16:35:35 -05:00
podcast_episodes Remove Unused JS file and Algolia References (#6750) [deploy] 2020-03-20 16:33:15 -05:00
podcasts Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
pro_memberships Consistently use cache_key_heroku_slug (#6495) 2020-03-06 16:35:35 -05:00
reading_list_items Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
service_worker Add logo_png SiteConfig for manifest etc. use (#6760) [deploy] 2020-03-23 14:31:41 +01:00
shared Add SRI Support (#4658) [deploy] 2019-12-06 08:35:37 -05:00
shell Add logo_png SiteConfig for manifest etc. use (#6760) [deploy] 2020-03-23 14:31:41 +01:00
sitemaps Update lastmod for generated sitemap (#6738) [deploy] 2020-03-19 18:59:36 -04:00
social_previews Changed shecoded preview template (#6475) 2020-03-05 18:26:28 -05:00
stories Create primary_sticker_image_url in SiteConfig (#6746) [deploy] 2020-03-23 14:55:18 -04:00
stripe_subscriptions Last general linting sweep (#1947) 2019-03-02 07:47:14 -08:00
tags Upgrade to webpacker/webpack 4 and Babel 7 (#6664) 2020-03-17 08:20:36 -04:00
twitch_live_streams Embed Twitch Live Streaming (#2591) 2019-04-29 18:11:53 -04:00
users Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
videos Allow community admins to alter site description (#6662) [deploy] 2020-03-16 15:34:49 -04:00