HomePhabricator
Diffusion Comm 3ddb5a9571be

[web] Move `exifRotate` from `input-state-container` to `media-utils`

Tags
None
Referenced Files
F611535: fbcb2c.png
Jul 28 2023, 2:53 PM
File Not Attached
F611534: 8430c3.png
Jul 28 2023, 2:53 PM
File Not Attached
F611533: 0a580a.png
Jul 28 2023, 2:53 PM
File Not Attached
Subscribers
None

Description

[web] Move exifRotate from input-state-container to media-utils

Summary:
I needed to use validateFile outside of input-state-container, but saw that it took exifRotate as an argument.

I first considered moving exifRotate to media-utils and exporting it globally so I could access it from input-state-container and elsewhere. But upon reading the code further, it looks like we only ever use exifRotate in processFile(file: File), so I just moved it right above without exporting.


Depends on D8363 (kind of)

Test Plan:
Logged value of browser and exifRotate in Safari/Chrome/FireFox:

0a580a.png (218×466 px, 27 KB)

8430c3.png (254×498 px, 32 KB)

fbcb2c.png (90×896 px, 19 KB)

Reviewers: ashoat, ginsu, rohan

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8364

Details