Commit 451fbcf3 authored by Carsten  Rose's avatar Carsten Rose
Browse files

F6886 / Upload: Update documentation. fixes #6886 and refs #6886

parent 2eabc916
Pipeline #933 passed with stage
in 1 minute and 47 seconds
......@@ -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`:
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment