v4: Fix errors if file uploaded has no extension