0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/utils/fixtures
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
..
app Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
config 🎨 config optimisations (#7921) 2017-02-02 12:46:30 +00:00
csv 🎨 Use GhostAuth name and example emails (#7475) 2016-10-03 15:11:43 +01:00
data 🎨Added case insensitive support for redirects (#9755) 2018-09-24 18:57:05 +02:00
export Changes for Koenig and Ghost 2.0 (#9750) 2018-08-16 12:13:24 +02:00
filter-param Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
images Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
import 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
settings Added tests for reloading routes.yaml 2018-08-16 12:13:24 +02:00
themes Fixed tests 2018-08-30 18:04:54 +01:00
data-generator.js 🎨Added absolute_url flag to public api (#9833) 2018-08-31 11:02:39 +01:00
example.js Add jscs task to grunt file and clean up files to adhere to jscs rules. 2014-09-17 21:44:29 -04:00
test.hbs Move API tests to /integration/ 2013-11-07 14:26:47 +01:00