diff --git a/extension/Documentation/Manual.rst b/extension/Documentation/Manual.rst index 33e65abfb7771e65658a496619a1000c96e9a2c5..07d14bdc7e77bc3c721a23cc0f63b727c319d303 100644 --- a/extension/Documentation/Manual.rst +++ b/extension/Documentation/Manual.rst @@ -2819,8 +2819,9 @@ See also at specific *FormElement* definitions. | accept | string | | | maxFileSize | string | | | fileDestination | string | | -| slaveId | string | | | fileReplace | string | | ++------------------------+--------+----------------------------------------------------------------------------------------------------------+ +| slaveId | string | | | sqlBefore | string | | | sqlInsert | string | | | sqlUpdate | string | | @@ -3414,8 +3415,8 @@ Inside the *Form editor* it's shown as a 'native FormElement'. During saving the current record, it behaves like an action FormElement and will be processed after saving the primary record and before any action FormElements are processed. -* *FormElement.value* = `<string>` - By default, the full path of any already uploaded file is shown. To show something different, e.g. - only the filename, define: :: +* *FormElement.value* = `<string>` - By default, the full path of any already uploaded file is shown. To show something + different, e.g. only the filename, define: :: a) {{filenameBase:V}} b) {{SELECT SUBSTRING_INDEX( '{{pathFileName:R}}', '/', -1) }} @@ -3477,7 +3478,7 @@ See also `downloadButton`_ to offer a download of an uploaded file. record, if table columns `fileSize` and/or `mimeType` exist. * If there are more than one Upload FormElement in a form, the automatically update for `fileSize` and/or `mimeType` - are not useful - the columns only handle + are not done automatically. * In :ref:`Upload advanced mode` the `fileSize` and / or `mimeType` have to be updated with an explicit SQL statement:: @@ -3485,6 +3486,18 @@ See also `downloadButton`_ to offer a download of an uploaded file. * *fileReplace* = `always` - If `fileDestination` exist - replace it by the new one. + * autoOrient: images might contain EXIF data (e.g. captured via mobile phones) incl. an orientation tag like TopLeft, + BottomRight and so on. Web-Browser and other grafic programs often understand and respect those information and rotate + such images automatically. If not, the image might be displayed in an unwanted oritentation. + With active option 'autoOrient', QFQ tries to normalize such images via 'convert' (part of ImageMagick). Especially + if images are processed by the QFQ internal 'Fabric'-JS it's recommended to normalize images first. The normalization + process does not solve all orientation problems. + + * *autoOrient* = [0|1] + * *autoOrientCmd = 'convert -auto-orient {{fileDestination:V}} {{fileDestination:V}}.new; mv {{fileDestination:V}}.new {{fileDestination:V}}' + * *autoOrientMimeType* = image/jpeg,image/png,image/tiff + + If the defaults for `autoOrientCmd` and `autoOrientMimeType` are sufficient, it's not necessary to specify them. .. _`downloadButton`: diff --git a/extension/qfq/qfq/Save.php b/extension/qfq/qfq/Save.php index e43f238c356b2980e257f459e4f6524102cbcd4d..fa15baefc0e5bc991d09134854654c743b866a40 100644 --- a/extension/qfq/qfq/Save.php +++ b/extension/qfq/qfq/Save.php @@ -801,7 +801,7 @@ class Save { } // Upload has matching MimeType? - $mimeTypeList = empty($formElement[FE_FILE_AUTO_ORIENT_MIME_TYPE]) ? 'image/jpeg,image/png' : $formElement[FE_FILE_AUTO_ORIENT_MIME_TYPE]; + $mimeTypeList = empty($formElement[FE_FILE_AUTO_ORIENT_MIME_TYPE]) ? 'image/jpeg,image/png,image/tiff' : $formElement[FE_FILE_AUTO_ORIENT_MIME_TYPE]; if(!HelperFile::checkFileType($pathFileName, $pathFileName, $mimeTypeList)) { return; }