You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit allows to add all kind of files to documents. Depending on the type of the file, a preview can be available or not.
Additionally, the way to show the files has been completely refactored, to make consistency with frontend views.
* Configures preview max size for images and JSON/XML files.
* Configures extensions which allow to show a preview.
* Adds a border to generated file thumbnail.
* Keeps the ratio when generating file thumbnail.
* Appends orginal extension to filename when generating system files, to avoid conflict with files having the same name.
* Adds defaults metadata values for file, only if file is not deleted.
* Moves some functions related to documents from `views.py` to `utils.py`, to use them in JSON serialization.
* Adds `restriction`, 'thumbnail` and `link` properties to file, in document detail view and serialization.
* Avoids to remove the `restriction` property during pre-loading data, because this property is flagged as `dump_only`.
* Removes call to `replace_refs()` in document detail view, as no `$ref` properties is used in template.
* Changes `restricted` image for a better one.
* Adds a default image if no thumbnail is available.
* Refactore the macro for displaying thumbnails, as more information is now present in file metadata.
* Closes#322.
* Closes#339.
Co-Authored-by: Sébastien Délèze <[email protected]>
No description provided.
The text was updated successfully, but these errors were encountered: