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
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
- Understand examples when working with deleteStaticFile().
- Understand rules when working with deleteStaticFile().
- 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.