macopedia / typo3-azurestorage

TYPO3 FAL driver extension for Microsoft Azure Blob Storage
MIT License
4 stars 5 forks source link

Add CLI script for fixing mime types for images #21

Closed tmotyl closed 4 years ago

tmotyl commented 4 years ago

usage: vendor/bin/typo3cms azurestorage:fixmime 10

fixes: https://github.com/benjaminhirsch/typo3-azurestorage/issues/18

benjaminhirsch commented 4 years ago

Really nice contribution and good idead! I think I'm going to add some more common mimetypes to the list before I release a new version 🙂

tmotyl commented 4 years ago

If mime types also needs to be updated in TYPO3 db, a query like

update sys_file set mime_type = 'image/jpeg', type = 2 where extension in ('jpg', 'jpeg') ;
update sys_file set mime_type = 'image/png', type = 2 where extension in ('png') ;

can be run