Prevent returning errors when uploading non-image files.