docbrown/app/javascript/article-form/elements
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
..
__mocks__ Remove Algolia from Comments (#6464) [deploy] 2020-03-05 11:30:25 -08:00
__tests__ Search Tags in Elasticsearch from Classified Listing and Post Creation (#6024) [deploy] 2020-02-17 08:16:45 -05:00
bodyMarkdown.jsx [WIP] Move both v1 and v2 editor to v2 preact-driven editor (#2797) 2019-05-13 12:27:36 -04:00
bodyPreview.jsx Add comment to highlight difference between previewing in v1 and v2 editors (#5894) 2020-02-04 08:32:06 -08:00
description.jsx [WIP] Implement non front-matter editor (#415) 2018-07-27 20:12:33 -07:00
errors.jsx fixed some eslint errors (#6476) 2020-03-06 20:03:49 +01:00
imageManagement.jsx Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
keyboardShortcutsHandler.jsx Add support for hotkey to toggle article preview (#3308) [ci skip] 2019-07-16 14:35:45 -04:00
mainImage.jsx Fix eslint issues in article-form's jsx files (#4217) 2019-10-19 17:09:06 -04:00
moreConfig.jsx Fix eslint issues in article-form's jsx files (#4217) 2019-10-19 17:09:06 -04:00
notice.jsx Fix text that says publishing for v1 (#2831) 2019-05-14 14:08:32 -04:00
publishToggle.jsx Add Stack Exchange Liquid tag (#3637) 2019-08-14 15:01:47 -04:00
title.jsx [WIP] Move both v1 and v2 editor to v2 preact-driven editor (#2797) 2019-05-13 12:27:36 -04:00