1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 09:42:41 +01:00
phorge-phorge/src/applications/files/conduit
epriestley e1d6bad864 Stop trying to assess the image dimensions of large files and file chunks
Summary:
Depends on D18828. Ref T7789. See <https://discourse.phabricator-community.org/t/git-lfs-fails-with-large-images/584>.

Currently, when you upload a large (>4MB) image, we may try to assess the dimensions for the image and for each individual chunk.

At best, this is slow and not useful. At worst, it fatals or consumes a ton of memory and I/O we don't need to be using.

Instead:

  - Don't try to assess dimensions for chunked files.
  - Don't try to assess dimensions for the chunks themselves.
  - Squelch errors for bad data, etc., that `gd` can't actually read, since we recover sensibly.

Test Plan:
  - Created a 2048x2048 PNG in Photoshop using the "Random Noise" filter which weighs 8.5MB.
  - Uploaded it.
  - Before patch: got complaints in log about `imagecreatefromstring()` failing, although the actual upload went OK in my environment.
  - After patch: clean log, no attempt to detect the size of a big image.
  - Also uploaded a small image, got dimensions detected properly still.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T7789

Differential Revision: https://secure.phabricator.com/D18830
2017-12-18 09:17:32 -08:00
..
FileAllocateConduitAPIMethod.php Remove SHA1 file content hashing and make Files work without any hashing 2017-04-04 16:22:10 -07:00
FileConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
FileDownloadConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
FileInfoConduitAPIMethod.php Provide a modern ("v3") API for querying files ("file.search") 2017-04-04 16:15:36 -07:00
FileQueryChunksConduitAPIMethod.php Give Conduit params/return/errors protected visibility 2015-04-13 11:58:35 -07:00
FileUploadChunkConduitAPIMethod.php Stop trying to assess the image dimensions of large files and file chunks 2017-12-18 09:17:32 -08:00
FileUploadConduitAPIMethod.php Remove SHA1 file content hashing and make Files work without any hashing 2017-04-04 16:22:10 -07:00
FileUploadHashConduitAPIMethod.php Deprecate "file.uploadhash" 2017-04-04 16:18:26 -07:00
PhabricatorFileSearchConduitAPIMethod.php Provide a modern ("v3") API for querying files ("file.search") 2017-04-04 16:15:36 -07:00