Page MenuHomePhabricator

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

Authored by atul on Jun 28 2023, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 1:10 AM
Unknown Object (File)
Sat, Dec 14, 3:19 PM
Unknown Object (File)
Sat, Dec 14, 2:26 PM
Unknown Object (File)
Sun, Dec 1, 4:09 PM
Unknown Object (File)
Nov 5 2024, 11:09 PM
Unknown Object (File)
Nov 5 2024, 11:09 PM
Unknown Object (File)
Nov 5 2024, 11:09 PM
Unknown Object (File)
Nov 5 2024, 11:09 PM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

remove extraneous type export

web/media/media-utils.js
101–103 ↗(On Diff #28235)

I sandwiched this between the type definition and the function to make it clear that these lines are "connected" to processFile... but happy to move it above type definition if that's more consistent.

atul published this revision for review.Jun 28 2023, 3:52 PM
This revision is now accepted and ready to land.Jun 28 2023, 6:50 PM
This revision was landed with ongoing or failed builds.Jul 28 2023, 2:53 PM
This revision was automatically updated to reflect the committed changes.