set mimetypes

This automatically sets the mimetypes of the uploaded files, deducing it from the extension.