Похожие чаты

👋 I have a html input="file" where users can upload pictures some

users report that if they upload images in portrait mode, it gets uploaded with the wrong side up

I can confirm the issue while I was watching a user uploading an image and it was indeed wrongly rotated once uploaded

Does anyone have an idea how to debug this or what could be the problem?

12 ответов

9 просмотров

Add a random spin button/thingy before image upload as a cool effect to the site that actually does nothing. No one will understand why someone images have rotated lol

Show code

You can listen when the image is rotated with JS

This may help https://stackoverflow.com/questions/18632356/how-to-extract-image-orientation-information-from-image-loaded-in-canvas

D
You can listen when the image is rotated with JS

Is there a specific event for it? I Googled but didn’t find anything.

Shayan
Is there a specific event for it? I Googled but di...

Try: document.getElementById('imageInput').addEventListener('change', function(event) {});

D
Try: document.getElementById('imageInput').addEven...

It’s nice if this solves the problem rather than using a feature-rich library like the one you mentioned just for this single purpose. (It seems like a good library, though)

Daniel- Автор вопроса
D
You can listen when the image is rotated with JS

input type="file" is literally all there is 😄

Daniel- Автор вопроса

I don't understand what you mean

Daniel- Автор вопроса

But what should I do with the element?

Похожие вопросы

Обсуждают сегодня

А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
4
I arrived here after a Chico Crypto show highlighted the project & the Team - the fact that the Team had a long history of successfully working with household names gave me e...
Banter is Bullish
1
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
Почему у макбука экран не сенсорный?
✨ Anatolii Cherednichenko
28
It's unfortunate that the "Then why are you here" or "lol you must've bought high" mantras always come up. I already tried bringing up this subject in the price channel but si...
Leroy Gerrits
4
Так а кто может спарсить всех участников чата? Идишники
Magic
17
Есть вопрос: допустим есть железка с каким-то интерфейсом(допустим usb), но как по этому интерфейсу железкой управлять неизвестно, прог нету, а управлять очень хочется надо. К...
Mixail Frolov
15
Карта сайта