1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-12 12:24:50 +01:00
phorge-phorge/src
Andre Klapper 6facee6140 Communicate max dimensions of profile images before upload
Summary:
Trying to set a large image as a project profile image, Phorge displays the "it is a mystery" placeholder image without errors or explanation.
Thus communicate the maximum file dimensions for transforming thumbnails, like Phorge already does for supported file format types.

Closes T15984

Test Plan:
* Go to http://phorge.localhost/project/picture/1/ and http://phorge.localhost/people/picture/1/ and set an image with 4096×4096px and an image with 4097×4097px and observe resulting image.
* Apply this patch, then go to http://phorge.localhost/project/picture/1/ and http://phorge.localhost/people/picture/1/ and see the additional "Maximum image dimensions: 4096×4096 pixels." in the "Upload New Picture" section, set an image with 4096×4096px and an image with 4097×4097px.
* Also test on http://phorge.localhost/phame/post/header/1/ and http://phorge.localhost/phame/blog/header/1/ but realize that these codepaths do not transform larger images, thus no problem. I remain clueless how to trigger PhameBlogProfilePictureController, DiffusionRepositoryProfilePictureController with similar code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15984

Differential Revision: https://we.phorge.it/D25862
2025-02-03 11:53:35 +01:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront PHPDoc: Replace "@return this" with "@return $this" 2024-09-09 15:48:09 +02:00
applications Communicate max dimensions of profile images before upload 2025-02-03 11:53:35 +01:00
docs docs: Remove extra 'B' from PHP config value 2024-12-08 14:21:02 +02:00
extensions
infrastructure Fix incorrect return value of PhabricatorCustomField::readValueFromObject() 2025-02-03 10:40:26 +01:00
view Allow zooming on pages 2024-11-26 14:07:09 +01:00
__phutil_library_init__.php Rebrand: Rename library and update "version" logic 2022-08-25 01:26:21 -07:00
__phutil_library_map__.php Allow customizing default Phurl view and edit policies 2024-12-14 09:56:59 +02:00