View Source Bonfire.Files.Definition behaviour (Bonfire v0.9.10-classic-beta.169)

Extension to Waffle.Definition, adding support for checking against media types parsed through magic bytes instead of file extensions, which can be modified by the user.

You can still use validate/2 and other waffle callbacks.

Summary

Callbacks

@callback allowed_media_types() :: [binary()] | :all
@callback max_file_size() :: [integer()] | :all