mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-04 12:44:57 +03:00
5c94151e14
refs #7688 Adds an `uploads/icon/` endpoint to the api route to get a seperate entry point for blog icon validations. The blog icon validation will specifically check for images which have icon extensions (`.ico` & `.png`) and throw errors if: - the icon file size is too big (>100kb) - the icon is not a squaer - the icon size is smaller than 32px - the icon size is larger than 1000px - the icon is not `.ico` or `.png` extension TODOs for this PR: - [X] get image dimensions - [X] validate for image - [X] size - [X] form (must be square) - [X] type - [X] dimenstion (min 32px and max 1,000px) - [X] return appropriate error messages - [X] write tests -------------------- TODOs for #7688: - [X] Figure out, which favicon should be used (uploaded or default) -> #7713 - [ ] Serve and redirect the favicon for any browser requests, incl. redirects -> #7700 [WIP] - [X] Upload favicon via `general/settings` and implement basic admin validations -> TryGhost/Ghost-Admin#397 - [X] Build server side validations -> this PR |
||
---|---|---|
.. | ||
authentication_spec.js | ||
configuration_spec.js | ||
db_spec.js | ||
error_spec.js | ||
notifications_spec.js | ||
posts_spec.js | ||
public_api_spec.js | ||
settings_spec.js | ||
slugs_spec.js | ||
spam_prevention_spec.js | ||
tags_spec.js | ||
themes_spec.js | ||
upload_icon_spec.js | ||
upload_spec.js | ||
users_spec.js |