Ghost/core/test/functional/routes/api
Aileen Nowak 5c94151e14 Blog icon validations (#7893)
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
2017-01-26 10:01:52 +01:00
..
authentication_spec.js 🎨 optimisations for brute (#7867) 2017-01-23 22:44:39 +01:00
configuration_spec.js 🎨 public config endpoint (#7631) 2016-10-28 14:07:46 +01:00
db_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
error_spec.js 🎉 🎨 Remove middleware/index.js (#7548) 2016-10-13 17:24:09 +02:00
notifications_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
posts_spec.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00
public_api_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
settings_spec.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00
slugs_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
spam_prevention_spec.js 🎨 optimisations for brute (#7867) 2017-01-23 22:44:39 +01:00
tags_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
themes_spec.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00
upload_icon_spec.js Blog icon validations (#7893) 2017-01-26 10:01:52 +01:00
upload_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
users_spec.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00