0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/unit
Rishabh Garg 39485d17c0 Added new endpoint to upload square profile images with dimension validation (#9862)
refs #8576

- adds new API endpoint `/uploads/profile-image` for uploading profile images
- new validation which fails with error message if uploaded image is not square
- Renamed getImageSizeFromFilePath to getImageSizeFromStoragePath, because it's more explicit
- Add new getImageSizeFromPath method, which is used in the new dimensions middleware
- Ensure we use the sharp middleware to auto-resize the uploaded profile pictures
- Ensure the new route get's added to v2

While this makes sure all future profile images uploaded are square, this doesn’t affect any existing non-square profile image. Needs more thought on how to handle existing non-square profile images for the purpose of making theming easier in future.
2018-09-24 21:42:58 +02:00
..
adapters Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
api Oembed meta tag fallback for unknown providers (#9827) 2018-08-27 15:02:03 +01:00
apps Removed usage of res.isAdmin from private blogging app 2018-09-15 08:58:53 +02:00
config Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
data Removed change frequency and priority fields from sitemap generator (#9771) 2018-09-24 19:16:31 +02:00
helpers 🎨 Added additional parameters to subscribe_form and input_email helpers (#9820) 2018-08-30 17:17:27 +01:00
lib Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
models 🎨Added absolute_url flag to public api (#9833) 2018-08-31 11:02:39 +01:00
public Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
services Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
web Extended uncapitalise unit tests (#9891) 2018-09-20 22:27:38 +02:00
filters_spec.js Tidy up unit test files (#9340) 2017-12-14 03:36:50 +01:00