Next.js Discord

Discord Forum

PPt file saving bug

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
I have this code here which basically saves a ppt file, the only problem is that whenever I have saved a file with it, I cant save another right away, I have to refresh manually to perform the saving once again, is there any way to overcome this?
 await ppt
        .writeFile({ fileName: `${name}.pptx` })
        .then(() => {
          toast.success("PowerPoint file saved successfully.");
          console.log("PowerPoint file saved successfully.");
          router.push("/dashboard/powerpoint");
        })
        .catch((err: any) => {
          console.error("Error saving PowerPoint file:", err);
        })
        .finally(() => {
          toast.dismiss();
        });

0 Replies