diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-01-13 18:08:49 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-01-13 18:08:49 +0100 |
| commit | 6710b9f7f223acd01ac82171d9f9f4eb577f5885 (patch) | |
| tree | e8328f43f107e5c5dbef2aeb8b2746239a44508a /client/common/upload.helpers.js | |
| parent | 47b6ae0f8ad2f49692222bb0c800e7ba1eb4b94b (diff) | |
serializing image failed, writing to tmp file instead
Diffstat (limited to 'client/common/upload.helpers.js')
| -rw-r--r-- | client/common/upload.helpers.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/common/upload.helpers.js b/client/common/upload.helpers.js index 5a041fd4..eb42a993 100644 --- a/client/common/upload.helpers.js +++ b/client/common/upload.helpers.js @@ -15,15 +15,15 @@ function base64ToUint8Array(string, start, finish) { } function getOrientation(uri) { - const exif = new ExifReader() // Split off the base64 data const base64String = uri.split(',')[1] // Read off first 128KB, which is all we need to // get the EXIF data const arr = base64ToUint8Array(base64String, 0, 2 ** 17) try { - exif.load(arr.buffer) - return exif.getTagValue('Orientation') + const tags = ExifReader.load(arr.buffer) + // console.log(tags) + return tags.Orientation } catch (err) { return 1 } |
