Ghost/core/server/lib
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
..
common Switched to eslint-plugin-ghost (#9835) 2018-09-17 20:49:30 +02:00
fs Changed http to https links 2018-08-16 12:13:24 +02:00
image Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
mobiledoc Updated gallery renderer to cope with invalid images 2018-08-31 11:13:24 +01:00
promise Moved pipeline/sequence to lib/promise 2017-12-13 22:20:02 +01:00
security Dynamic Routing: Added migration for routes.yaml file (#9692) 2018-06-22 20:28:01 +02:00
social 🔥 Drop Node v4 Support 2018-05-01 14:06:18 +02:00
constants.js Moved utils constants to lib/constants 2017-12-14 14:13:40 +01:00
ghost-version.js Switched to eslint-plugin-ghost (#9835) 2018-09-17 20:49:30 +02:00
request.js Removed bluebird promise wrap in request lib (#9343) 2018-01-02 12:18:56 +01:00