Capítulo 350 de 988

Chapter 350: deleteStaticFile()

Core Idea

Deletes a file from the public directory. This API is useful for building interactive experiences in the Remotion Studio.

Key Concepts

  • Examples
  • Rules
  • See also

Code Examples

export const DeleteStaticFileComp: React.FC = () => {
  const deleteFile = useCallback(async () => {
    const { existed } = await deleteStaticFile("video.webm");

    console.log(`Deleted file (${existed ? "existed" : "did not exist"})`);
  }, []);

  return <button onClick={deleteFile}>Delete</button>;
};
  • What it demonstrates: Usage pattern for deleteStaticFile() from the official docs.

Key Takeaways

  1. Understand examples when working with deleteStaticFile().
  2. Understand rules when working with deleteStaticFile().
  3. Understand see also when working with deleteStaticFile().

Connects To

  • Clipper: related page in the Studio, Player & Editing section.
  • Design Systems: related page in the Studio, Player & Editing section.
  • Editor Starter: related page in the Studio, Player & Editing section.