function validateBlobType(blob, type, path) {
  if (!blob.type.includes(type)) {
    throw new Error(
      `File ${path ?? '(Blob)'} is of type ${blob.type}, but a ${type} type blob was expected.`,
    );
  }
}
@param {Blob} blob
@param {string} type
@param {string} [path]