SmartAuth 2.0.59: the description of photos saved in the file
A photo's description travels with it
Mobile applications connected to SmartAuth send their photos via a common upload route. Until now, the title, caption, and keywords entered with a photo were only stored in Dolibarr: once the file was downloaded or shared, it no longer carried any description.
SmartAuth can now write them into the file itself, in the XMP format recognized by common photo viewers and software. A construction site photo sent to a customer thus retains its title and caption.
What changes for images
The JPEG, WebP, and PNG formats are supported. The image is never recompressed: only the description information is added, existing Exif data is preserved. A description modified later is rewritten in place of the old one, without duplication.
Writing is done entirely in PHP, with no external tools to install on the server. If it fails for a particular file, the photo is saved as it was sent, and the reason is logged.
For module developers
A module that receives its photos via SmartAuth's upload route passes the
title, caption, and keywords to UploadHelper::consumeUpload(). For a
description modified afterward, ImageXmpWriter::writeFile() rewrites the
already stored file. The format is the same as that used for writing on the
SmartCommon application side: a file described by the application and then by the
server only carries a single description block.
Alte limbi: Deutsch, Español, Français, Italiano, Nederlands, Polski, Português