{"_id":"@autorender/strapi","name":"@autorender/strapi","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@autorender/strapi","version":"0.1.0","description":"Strapi v5 admin plugin for AutoRender — use AutoRender as your Strapi Media Library upload provider and import existing AutoRender DAM assets by reference.","keywords":["strapi","plugin","strapi-plugin","autorender","dam","cdn","media-library","upload-provider"],"type":"commonjs","exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","source":"./admin/src/index.ts","import":"./dist/admin/index.mjs","require":"./dist/admin/index.js","default":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","source":"./server/src/index.ts","import":"./dist/server/index.mjs","require":"./dist/server/index.js","default":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","clean":"rimraf dist","watch":"strapi-plugin watch","watch:link":"strapi-plugin watch:link","verify":"strapi-plugin verify","typecheck":"tsc -p server/tsconfig.json --noEmit && tsc -p admin/tsconfig.json --noEmit"},"dependencies":{"@strapi/design-system":"^2.0.0-rc.23","@strapi/icons":"^2.0.0-rc.23","@tanstack/react-query":"^5.76.0","formik":"^2.4.6","react-intl":"^7.1.11","zod":"^3.24.4"},"devDependencies":{"@strapi/sdk-plugin":"^5.3.2","@strapi/strapi":"^5.13.0","@strapi/typescript-utils":"^5.13.0","@strapi/upload":"^5.13.0","@types/react":"^19.1.3","@types/react-dom":"^19.1.4","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.30.0","rimraf":"^6.0.1","styled-components":"^6.1.18","typescript":"^5.8.3"},"peerDependencies":{"@strapi/sdk-plugin":"^5.3.2","@strapi/strapi":"^5.13.0","@strapi/upload":"^5.13.0","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.30.0","styled-components":"^6.1.18"},"strapi":{"kind":"plugin","name":"autorender","displayName":"AutoRender","description":"Browse, import, and upload AutoRender DAM assets from Strapi."},"author":{"name":"Autorender"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/autorender/autorender-sdk.git","directory":"packages/strapi"},"homepage":"https://github.com/autorender/autorender-sdk#readme","bugs":{"url":"https://github.com/autorender/autorender-sdk/issues"},"_id":"@autorender/strapi@0.1.0","gitHead":"80614c9784451a9d0fbb101065e45167752a675c","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-UjSO6v5/rmwxfX7fSrE/YJkb9cnJ/N5pVzbtywT7ud629jbUJ4ygZWeuvjI3FAl8vyNYuuFGe8dDsssGDma8SQ==","shasum":"a6881568afdbd6f90f6e8dfbab1369cfb81c0031","tarball":"https://registry.npmjs.org/@autorender/strapi/-/strapi-0.1.0.tgz","fileCount":65,"unpackedSize":1818597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAKEb+/SihhrOnauxBP6XPXeEu6Rl3RiSrYFDtrxSQwEAiAkwg13bwZ8bI6htxwxO/UDlwdim2j+N9PYcSYch4XfHQ=="}]},"_npmUser":{"name":"autorender","email":"autorenderhq@gmail.com"},"directories":{},"maintainers":[{"name":"autorender","email":"autorenderhq@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/strapi_0.1.0_1787595314274_0.35242769474921176"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T18:15:14.107Z","0.1.0":"2026-08-24T18:15:14.453Z","modified":"2026-08-24T18:15:14.693Z"},"maintainers":[{"name":"autorender","email":"autorenderhq@gmail.com"}],"description":"Strapi v5 admin plugin for AutoRender — use AutoRender as your Strapi Media Library upload provider and import existing AutoRender DAM assets by reference.","homepage":"https://github.com/autorender/autorender-sdk#readme","keywords":["strapi","plugin","strapi-plugin","autorender","dam","cdn","media-library","upload-provider"],"repository":{"type":"git","url":"git+https://github.com/autorender/autorender-sdk.git","directory":"packages/strapi"},"author":{"name":"Autorender"},"bugs":{"url":"https://github.com/autorender/autorender-sdk/issues"},"license":"MIT","readme":"# @autorender/strapi\n\nA Strapi v5 admin plugin for [AutoRender](https://autorender.io) — a media/DAM (digital asset management) and image/video CDN platform. Use AutoRender as your Strapi Media Library upload provider, and browse + import existing AutoRender assets into Strapi without re-uploading any bytes.\n\n## Table of Contents\n\n1. [Plugin Features](#plugin-features)\n2. [Prerequisites](#prerequisites)\n3. [Installation](#installation)\n4. [Essential Configuration](#essential-configuration)\n5. [Media Upload Configuration](#media-upload-configuration)\n6. [Using AutoRender Assets in Strapi](#using-autorender-assets-in-strapi)\n7. [Permissions (RBAC)](#permissions-rbac)\n8. [Advanced: Programmatic Configuration (config/plugins.js)](#advanced-programmatic-configuration-configpluginsjs)\n9. [Configure Security Middleware (CSP)](#configure-security-middleware-csp)\n10. [Troubleshooting](#troubleshooting)\n11. [License](#license)\n\n## Plugin Features\n\n- **AutoRender Media Library**: browse your AutoRender folders (shown as cards) and files directly inside the Strapi admin panel, with search and pagination.\n- **Import by reference**: select AutoRender assets and import them into Strapi's own Media Library with a single click — Strapi stores the AutoRender CDN URL directly, it does not copy or re-host the file bytes.\n- **Upload straight from the browser**: an \"Upload\" button on the Media Library page sends new files to AutoRender without leaving Strapi.\n- **Upload provider**: optionally route new Strapi Media Library uploads straight to AutoRender instead of local disk storage, with configurable upload folder, tags, and random file-name prefixing.\n\nThis plugin intentionally does **not** implement signed URLs, private files, or a \"Media Delivery\" URL-rewriting feature. The AutoRender API always returns plain, permanent, public CDN links for every asset — there is no signed-URL or private-file capability to configure.\n\n## Prerequisites\n\nBefore you begin, you need:\n\n- A Strapi project (v5.13.0 or later, within the v5 line)\n- Node.js >= 18 and npm/yarn installed\n- Administrator access to your Strapi instance\n- An AutoRender account and API key\n\n## Installation\n\nInstall the plugin from your Strapi project's root directory:\n\n```bash\nnpm install @autorender/strapi --save\n```\n\nThen rebuild your Strapi instance so the admin panel picks up the plugin:\n\n```bash\nnpm run build\nnpm run develop\n\n# OR, during development, with auto-reload for the admin panel:\nnpm run develop -- --watch-admin\n```\n\nThe **AutoRender** entry will appear in the main navigation sidebar, and an **AutoRender** section will appear under **Settings**.\n\n## Essential Configuration\n\nOpen **Settings > AutoRender** in the Strapi admin panel and fill in the **Basic Configuration** section:\n\n1. **AutoRender API Key** — the bearer token used to authenticate every request to the AutoRender API (`Authorization: Bearer <api_key>`). It's stored server-side and every AutoRender API call happens from the Strapi backend. Admins with only the **Settings: Read** permission (see [Permissions (RBAC)](#permissions-rbac)) see a masked value in the Settings page; admins with **Settings: Change** can see and copy the real key, since they could already read it directly from the database or `config/plugins.js`.\n2. **Enable AutoRender integration** — the master switch for the plugin. This must be on for AutoRender to be usable as an upload provider or for the Media Library page to function.\n\nThe API base URL (`https://upload.autorender.io/api/v1`) is fixed and not configurable — AutoRender's REST API only has one endpoint, so there's nothing to set.\n\nClick **Save**.\n\n## Media Upload Configuration\n\nStill on the **Settings > AutoRender** page, under **Upload Configuration**:\n\n1. **Upload new media to AutoRender** — when enabled, every file uploaded through the Strapi Media Library (from the Content Manager, the Media Library page, anywhere) is sent to AutoRender instead of Strapi's local/default storage. When disabled, uploads use whatever provider was configured before installing this plugin. Enabling this does **not** retroactively migrate files you already uploaded to Strapi.\n2. **Upload Folder** — a base folder path in AutoRender under which new uploads are stored (e.g. `/strapi-uploads`). Combined with any Strapi-side folder path if you use Strapi's Media Library folders.\n3. **Tags** — a comma-separated list of tags applied to every file uploaded from Strapi (e.g. `strapi, media`).\n4. **Add random prefix to file names** — when enabled, AutoRender prefixes uploaded file names to avoid collisions with existing files of the same name.\n\n## Using AutoRender Assets in Strapi\n\nOpen the **AutoRender** page from the main sidebar to browse your existing AutoRender library:\n\n- Use the folder cards, or the search box, to find the assets you want. Folders can nest — clicking one shows its subfolders and files, with a breadcrumb trail (**Root / …**) to navigate back up.\n- Select one or more assets by clicking a tile (or its checkbox).\n- Click **Import selected** to create the corresponding entries in Strapi's own Media Library.\n- Or click **Upload** to add a new file straight to AutoRender without leaving Strapi — it uploads into whichever folder you're currently browsing, and the grid refreshes automatically once it's done.\n\nImporting is **by reference, not by copy**: Strapi does not download or re-host the file bytes. Each imported Media Library entry simply stores the AutoRender asset's CDN `url` (and `thumbnail`, if AutoRender returned one, as the preview image). When you fetch that media through Strapi's API or render it in the admin panel, you'll see the AutoRender CDN URL directly — the same URL AutoRender's API returned. Deleting the Strapi entry does not delete the underlying AutoRender asset, and re-uploading or editing the asset in AutoRender is not reflected automatically in Strapi (you would need to re-import it).\n\n## Permissions (RBAC)\n\nBy default, only Super Admins can see and use the AutoRender pages. To grant access to other admin roles, go to **Settings > Administration Panel > Roles**, pick a role, and enable the permissions you want under the **AutoRender** section:\n\n- **Access AutoRender Media Library** — lets a user open the Media Library page and browse/search AutoRender folders and files. Read-only: it does not allow importing or uploading anything.\n- **Import and upload AutoRender media** — lets a user click **Import selected** and **Upload**. Grant this alongside the permission above; without it, those controls are disabled even if the user can see the page (a direct write request without this permission is still rejected with a 403).\n- **Settings: Read** / **Settings: Change** — under the plugin's **Settings** category, these control who can view (masked API key) or edit the AutoRender configuration.\n\n## Advanced: Programmatic Configuration (config/plugins.js)\n\nYou can provide default configuration values in your Strapi project's `config/plugins.js`. These values are only used to seed the plugin's settings **the first time** the application boots — after that, whatever is saved through the admin Settings page (stored in the database) takes precedence.\n\n```js\nmodule.exports = ({ env }) => ({\n  autorender: {\n    enabled: true,\n    config: {\n      // Basic Configuration\n      apiKey: env('AUTORENDER_API_KEY'),\n\n      // Upload Configuration\n      uploadEnabled: true,\n      uploadOptions: {\n        folder: '/strapi-uploads',\n        tags: ['strapi', 'media'],\n        randomPrefix: false,\n      },\n    },\n  },\n});\n```\n\nAdd the corresponding variables to your `.env` file:\n\n```env\nAUTORENDER_API_KEY=your_autorender_api_key_here\n```\n\nRestart your Strapi server for the changes to take effect:\n\n```bash\nnpm run develop\n```\n\n## Configure Security Middleware (CSP)\n\nTo let your Strapi admin panel load images and videos served from AutoRender's CDN, update the Content Security Policy in `config/middlewares.js`. This only configures the CSP headers Strapi itself serves — a separately deployed frontend that renders Strapi media needs the same CDN domain added to its own `img-src`/`media-src` directives. Because this plugin's Media Library page never embeds a third-party iframe widget — unlike some other DAM plugins — you only need to extend `img-src` and `media-src`; **no `frame-src` entry is required**. The admin frontend only ever calls Strapi's own backend routes (browser `connect-src 'self'` is enough) — every AutoRender API call happens server-side and isn't subject to the browser's CSP at all.\n\n```js\n// config/middlewares.js\nmodule.exports = [\n  {\n    name: 'strapi::security',\n    config: {\n      contentSecurityPolicy: {\n        useDefaults: true,\n        directives: {\n          'connect-src': [\"'self'\"],\n          'img-src': [\n            \"'self'\",\n            'data:',\n            'blob:',\n            'assets.autorender.io', // Replace with your actual AutoRender CDN / custom domain\n          ],\n          'media-src': [\n            \"'self'\",\n            'data:',\n            'blob:',\n            'assets.autorender.io', // Replace with your actual AutoRender CDN / custom domain\n          ],\n          upgradeInsecureRequests: null,\n        },\n      },\n    },\n  },\n  // Keep your other middleware entries here\n];\n```\n\n> If you use a custom domain with AutoRender, replace `assets.autorender.io` with that domain instead.\n\n## Troubleshooting\n\n- **\"AutoRender integration is disabled\"** — turn on **Enable AutoRender integration** under Settings > AutoRender and save.\n- **\"Missing AutoRender API key\"** — add a valid API key under Settings > AutoRender, or via `config/plugins.js` (see above).\n- **A user can browse but \"Import selected\" / \"Upload\" are disabled** — see [Permissions (RBAC)](#permissions-rbac); the two Media Library permissions are separate. A direct write request without that permission still returns a 403.\n- **Browsing occasionally fails with a generic network error, but works on retry** — the API client automatically retries transient connection failures for idempotent `GET`/`HEAD` requests (browsing folders/files) only. A failure that survives several automatic retries usually means AutoRender itself is unreachable or the API key is invalid — check both before retrying manually.\n- **An import or upload fails with a generic network error** — writes (`POST`) are never retried automatically, since retrying a write whose response was lost could create a duplicate asset. Confirm whether the import/upload actually completed in AutoRender before retrying it yourself.\n- **An imported asset shows as a generic file instead of an image** — this plugin infers a usable mime type from AutoRender's own metadata, falling back to the file extension; if an asset still doesn't render, check that AutoRender itself reports a correct `format` for it.\n\n## License\n\nThis project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md","_rev":"1-dfebe63ded63bc64bb1686959978f7bc"}