Fix cases where mime checking is application/octet-stream