z_media_sanitize (zotonic_core v1.0.0-rc.17)

Check if an identified file is acceptable as upload.

Summary

Functions

Check the contents of an identified file, to see if it is acceptable for further processing. Catches files that might be problematic for ImageMagick or other file processors.

Sanitize uploaded media (SVG) files.

Functions

is_file_acceptable(File, MediaProps)

-spec is_file_acceptable(file:filename_all(), z_media_identify:media_info()) -> boolean().

Check the contents of an identified file, to see if it is acceptable for further processing. Catches files that might be problematic for ImageMagick or other file processors.

sanitize(Media_upload_preprocess, Context)

Sanitize uploaded media (SVG) files.