Skip to content

Commit

Permalink
Fix excel import in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
rrahir committed Dec 17, 2024
1 parent 9fe8ddd commit 69624be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,18 @@ class Demo extends Component {
for (let i = 0; i < contents.length; i++) {
inputFiles[files[i]] = contents[i];
}
this.leaveCollaborativeSession();
await fetch("http://localhost:9090/clear");

for (let i = 0; i < images.length; i++) {
const blob = inputFiles[images[i]];
const file = new File([blob], images[i].split("/").at(-1));
const imageSrc = await this.fileStore.upload(file);
inputFiles[images[i]] = { imageSrc };
}
await this.initiateConnection(inputFiles);
// await this.initiateConnection(inputFiles);
this.model = new Model(inputFiles, {
evalContext: { env: this.env },
mode: "normal",
});
this.state.key = this.state.key + 1;

// note : the onchange won't be called if we cancel the dialog w/o selecting a file, so this won't be called.
Expand Down

0 comments on commit 69624be

Please sign in to comment.