0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/test/functional/routes/api
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
..
authentication_spec.js 🔥 Drop Node v4 Support 2018-05-01 14:06:18 +02:00
configuration_spec.js Import lib/common only 2017-12-12 10:28:13 +01:00
db_spec.js Added option to export extra tables 2018-08-03 14:11:45 +02:00
error_spec.js Speed up routing tests 2017-12-05 12:32:04 +01:00
notifications_spec.js 🐛 Fixed showing old release notifications in the about page 2018-01-18 12:19:55 +01:00
oembed_spec.js Added /oembed API endpoint 2018-06-12 16:18:01 +01:00
posts_spec.js 🔥 Removed demo post (#9769) 2018-08-16 12:13:24 +02:00
public_api_spec.js 🎨Added absolute_url flag to public api (#9833) 2018-08-31 11:02:39 +01:00
redirects_spec.js 🎨Added case insensitive support for redirects (#9755) 2018-09-24 18:57:05 +02:00
settings_spec.js 🔥 Removed permalink setting 2018-08-16 12:13:24 +02:00
slugs_spec.js Speed up routing tests 2017-12-05 12:32:04 +01:00
spam_prevention_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
tags_spec.js Speed up routing tests 2017-12-05 12:32:04 +01:00
themes_spec.js Fixed tests 2018-08-16 12:13:24 +02:00
upload_icon_spec.js Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
upload_spec.js Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
users_spec.js Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
webhooks_spec.js Speed up routing tests 2017-12-05 12:32:04 +01:00