trait Mimetypes

Provides a list of common (permitted) mimetypes for file uploads.

Methods

array
listAudioMimetypes()

Return a list of permitted audio mimetypes and extensions.

array
listImageMimetypes()

Return a list of permitted image mimetypes and extensions.

array
listVideoMimetypes()

Return a list of permitted video mimetypes and extensions.

array
listMimetypes()

Returns an array of mimetypes that are permitted for upload to the media directory.

Details

at line 36
array listAudioMimetypes()

Return a list of permitted audio mimetypes and extensions.

Return Value

array

at line 51
array listImageMimetypes()

Return a list of permitted image mimetypes and extensions.

Return Value

array

at line 65
array listVideoMimetypes()

Return a list of permitted video mimetypes and extensions.

Return Value

array

at line 85
array listMimetypes()

Returns an array of mimetypes that are permitted for upload to the media directory.

NOTE: Adding HTML or any other scripting language or executable to this list would be a BAD IDEA, as such files can include PHP code, although uploaded files have execution permissions removed and are stored outside of the web root in order to prevent direct access by browser.

Return Value

array Array of permitted mimetypes and extensions.