integrate-asset-delivery-with-transloadit-smartcdn-in-nextjs
Installation
SKILL.md
Inputs
- Required env (server-only):
TRANSLOADIT_KEY,TRANSLOADIT_SECRET,TRANSLOADIT_SMARTCDN_WORKSPACE,TRANSLOADIT_SMARTCDN_TEMPLATE, andTRANSLOADIT_SMARTCDN_INPUT
For local dev, put these in .env.local. Never expose TRANSLOADIT_SECRET to the browser.
Use a Template owned by TRANSLOADIT_SMARTCDN_WORKSPACE and give TRANSLOADIT_SMARTCDN_INPUT a
fixed asset or storage path. Do not use a shared Template that accepts an arbitrary origin URL. If
a workspace Template imports over HTTP, constrain its origin and path in the Template instead of
accepting an arbitrary URL from the request.
Install
npm i @transloadit/utils