stripping all query strings before validation to detect the right mimetype