Added mime type control on uploaded files

Only images and pdfs are now allowed.