xperseguers / t3ext-extractor

TYPO3 Extension extractor
https://extensions.typo3.org/extension/extractor
GNU General Public License v2.0
14 stars 23 forks source link

JPG Upload results in 500 error #39

Closed MediKathi closed 2 years ago

MediKathi commented 3 years ago

Hello,

If I upload a certain JPG-Files I got:

(1/2) Doctrine\DBAL\Exception\DriverException

An exception occurred while executing 'INSERT INTO `sys_file_metadata` (`file`, `pid`, `crdate`, `tstamp`, `cruser_id`, `l10n_diffsource`, `width`, `height`, `color_space`, `content_creation_date`, `creator_tool`, `unit`, `camera_make`, `camera_model`, `shutter_speed`, `focal_length`, `iso_speed`, `aperture`, `flash`, `content_modification_date`, `source`, `camera_lens`, `white_balance_mode`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [135, 0, 1620133808, 1620133808, 11, "", 319, 244, "RGB", 1583507631, "GIMP 2.10.22", "px", "Canon", "Canon EOS 5D Mark IV", "1\/80", 304.4, 400, 2.2, "Off, Did not fire", 1620133698, "Digital Camera", "Canon EF 50mm f\/1.4 USM", "Auto"]: Incorrect integer value: 'Off, Did not fire' for column 'flash' at row 1

I included an Image which causes the error, (for leagal reasons I had to cut the Content of the Image, but I keeped the EXIF-Data)

Typo3: 10.4.15 Extractor: 2.1.0

Far as I can see, the issue is caused by an incorrent "Flash" value given by the Camera. I suggest to set a default value if the Flash value cannot be pared as integer.

test

davidlemaitre commented 2 years ago

Facing with the same issue with jpg images. Downgrading to v1.7.3 as workaround.

xperseguers commented 2 years ago

That's crazy that manufacturer are not even able to follow a specification when writing EXIF information (see https://www.exiftool.org/TagNames/EXIF.html#Flash).

I'd suggest to do this work for them and add a mapping of the "meaning" back to the corresponding integer value and only fall back to 0 if this mapping fails.

MediKathi commented 2 years ago

I had this issue again, but in an other Field

Uncaught TYPO3 Exception: An exception occurred while executing 'INSERT INTO `sys_file_metadata` (`file`, `pid`, `crdate`, `tstamp`, `cruser_id`, `l10n_diffsource`, `color_space`, `height`, `width`, `unit`, `camera_make`, `camera_model`, `shutter_speed`, `focal_length`, `iso_speed`, `aperture`, `flash`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [817, 0, 1628233069, 1628233069, 22, "", "RGB", 1282, 1920, "px", "Panasonic", "DMC-FZ150", "10\/2500", 7.8, "200, 0", 3.2, "16, 0"]: Data truncated for column 'iso_speed' at row 1

I suggest fallback values for all database fields

LeoniePhiline commented 2 years ago

Hi @xperseguers

Would you mind releasing a version 2.2 with https://github.com/xperseguers/t3ext-extractor/commit/0d820c8f8a735bfdb959f827f1ca8a0b3f804680?