export type KubeflowUploadDto = {
  name: string;
  display_name?: string;
  description?: string;
  namespace?: string;
  regUserId: string | number; // number도 허용
  projectId: number | string;
  uploadfile: File | Blob;
};

export function toKubeflowForm(dto: KubeflowUploadDto): FormData {
  const fd = new FormData();
  fd.append("name", dto.name);
  fd.append("display_name", dto.display_name || dto.name);
  fd.append("description", dto.description || "");
  fd.append("namespace", dto.namespace || "default");
  fd.append("regUserId", String(dto.regUserId));
  fd.append("projectId", String(dto.projectId));
  fd.append("uploadfile", dto.uploadfile);
  return fd;
}
