Use the CDN global or the ESM build. Call FileStorageSDK.mount inside a useEffect, and clean up on unmount.
useEffect(() => {
const api = FileStorageSDK.mount({
el: '#fm',
apiKey: import.meta.env.VITE_FS_KEY,
s3: { proxyBaseUrl: 'https://api.example.com/fs' },
})
return () => api?.unmount?.()
}, [])Full examples live in the integration guide. For editor embeds, see editor plugins.