{"id":21730017,"url":"https://github.com/jarvisprestidge/payload-cloud-storage-vercel-adapter","last_synced_at":"2025-04-13T00:14:01.145Z","repository":{"id":229866758,"uuid":"777844108","full_name":"JarvisPrestidge/payload-cloud-storage-vercel-adapter","owner":"JarvisPrestidge","description":"A stop-gap solution for using Vercel Blob Storage with Payload CMS v3","archived":false,"fork":false,"pushed_at":"2025-04-11T08:02:41.000Z","size":106,"stargazers_count":7,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:13:54.440Z","etag":null,"topics":["payload","payload-cms","payloadcms","vercel","vercel-blob"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JarvisPrestidge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-26T15:54:23.000Z","updated_at":"2024-05-25T19:24:02.000Z","dependencies_parsed_at":"2024-04-26T22:30:42.613Z","dependency_job_id":"1422cbee-c6bc-4e8e-8de4-beacbb59f5c9","html_url":"https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter","commit_stats":null,"previous_names":["jarvisprestidge/payload-cloud-storage-vercel-adapter"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarvisPrestidge%2Fpayload-cloud-storage-vercel-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarvisPrestidge%2Fpayload-cloud-storage-vercel-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarvisPrestidge%2Fpayload-cloud-storage-vercel-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarvisPrestidge%2Fpayload-cloud-storage-vercel-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JarvisPrestidge","download_url":"https://codeload.github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647274,"owners_count":21139086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["payload","payload-cms","payloadcms","vercel","vercel-blob"],"created_at":"2024-11-26T04:11:15.700Z","updated_at":"2025-04-13T00:14:01.120Z","avatar_url":"https://github.com/JarvisPrestidge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" id=\"top\"\u003e\n\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[![Version][version-shield]][version-url]\n[![Issues][issues-shield]][issues-url]\n[![Pulls][pulls-shield]][pulls-url]\n[![Codecov][codecov-shield]][codecov-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n![header-light](https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/assets/6669336/b06bd7cb-e9e0-405c-872d-92ecbf86ec63)\n\n  \u003cp align=\"center\"\u003e\n    A stop-gap solution for using Vercel Blob Storage with Payload CMS v3 \n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"https://www.typescriptlang.org/\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/6669336/169691369-e95c9e02-f33a-40f6-89e4-3709d16440d5.svg\" alt=\"Made with TypeScript\"\u003e\n  \u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003e [!IMPORTANT]\n\u003e Only for use with Payload CMS v3 (currently in alpha).\n\u003e\n\u003e This package will be deprecated once the official Vercel Blob Storage adapter is released.\n\n\u003cbr/\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n      \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#api\"\u003eAPI\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## 💾 Installation\n\n```bash\n$ npm install payload-cloud-storage-vercel-adapter\n```\n\n```bash\n$ yarn add payload-cloud-storage-vercel-adapter\n```\n\n```bash\n$ pnpm add payload-cloud-storage-vercel-adapter\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🔨 Usage\n\n\u003e [!NOTE]\n\u003e Requirements:\n\u003e\n\u003e -   Payload v3\n\nAdd the plugin within your Payload config as follows, passing in your Vercel Blob Storage token and storeId, and optionally any upload options.\n\n```typescript\nimport path from \"path\";\nimport { cloudStorage } from \"@payloadcms/plugin-cloud-storage\";\nimport { vercelBlobAdapter } from \"payload-cloud-storage-vercel-adapter\";\nimport { buildConfig } from \"payload/config\";\n\nexport default buildConfig({\n    plugins: [\n        cloudStorage({\n            collections: {\n                [Media.slug]: {\n                    adapter: vercelBlobAdapter({\n                        token: process.env.BLOB_READ_WRITE_TOKEN || \"\",\n                        storeId: process.env.BLOB_STORE_ID || \"\"\n                    }),\n                    disableLocalStorage: true,\n                    disablePayloadAccessControl: true\n                }\n            }\n        })\n    ]\n    // The rest of your config goes here\n});\n```\n\n## ⚙️ Plugin Configuration\n\nThis plugin allows for the following configuration options to be passed to the vercel package:\n\n| Name                               | Type    | Required | Description                                                                                     |\n| ---------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------- |\n| `token`                            | string  | Yes      | Your Vercel API token.                                                                          |\n| `storeId`                          | string  | Yes      | The identifier of your Vercel storage.                                                          |\n| `uploadOptions`                    | object  | No       | An object specifying options for uploads.                                                       |\n| `uploadOptions.access`             | string  | No       | Determines the access level for uploaded items. Default: `public`.                              |\n| `uploadOptions.addRandomSuffix`    | boolean | No       | Indicates whether to add a random suffix to uploaded filenames. Default: `false`.               |\n| `uploadOptions.cacheControlMaxAge` | number  | No       | Specifies the maximum age for cache control headers (in seconds). Default: `31536000` (1 year). |\n\n## ❤️ Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request.\nDon't forget to give the project a star! Thanks again!\n\n### Tooling\n\n-   [Changeset](https://github.com/atlassian/changesets) for changes to documentation, changelog generation, and release management.\n\n### Making a Pull Request\n\n1. Fork the project and clone your fork:\n\n```bash\ngh repo fork --clone\n```\n\n2. Create your feature branch:\n\n```bash\ngit checkout -b feature/AmazingFeature\n```\n\n3. Commit your changes:\n\n```bash\ngit commit -m 'Add some AmazingFeature'\n```\n\n4. Use the changeset cli to create a detailed description of your changes.\n\n```bash\nyarn changeset\n```\n\n\u003e This will be used to generate a changelog when we publish an update. [Learn more about Changeset](https://github.com/atlassian/changesets/tree/master/packages/cli).\n\n5. Push branch and open a Pull Request\n\n```bash\ngh pr create\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 📜 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 📫 Contact\n\nJarvis Prestidge - jarvisprestidge@gmail.com\n\nProject Link: [https://github.com/jarvisprestidge/payload-cloud-storage-vercel-adapter](https://github.com/jarvisprestidge/payload-cloud-storage-vercel-adapter)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[typescript-shield]: https://img.shields.io/badge/made%20with-typescript-%23007ACC?style=for-the-badge\u0026link=https://www.typescriptlang.org \"TypeScript (External Link)\"\n[issues-shield]: https://img.shields.io/github/issues/JarvisPrestidge/payload-cloud-storage-vercel-adapter.svg?style=for-the-badge\n[issues-url]: https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/issues\n[pulls-shield]: https://img.shields.io/github/issues-pr/JarvisPrestidge/payload-cloud-storage-vercel-adapter.svg?style=for-the-badge\n[pulls-url]: https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/pulls\n[license-shield]: https://img.shields.io/github/license/JarvisPrestidge/payload-cloud-storage-vercel-adapter.svg?style=for-the-badge\n[license-url]: https://github.com/JarvisPrestidge/payload-cloud-storage-vercel-adapter/blob/master/LICENSE.txt\n[codecov-shield]: https://img.shields.io/codecov/c/gh/JarvisPrestidge/payload-cloud-storage-vercel-adapter?style=for-the-badge\n[codecov-url]: https://app.codecov.io/gh/JarvisPrestidge/payload-cloud-storage-vercel-adapter\n[version-shield]: https://img.shields.io/github/package-json/v/jarvisprestidge/payload-cloud-storage-vercel-adapter?style=for-the-badge\n[version-url]: https://www.npmjs.com/package/payload-cloud-storage-vercel-adapter\n[check-icon]: https://github.com/bjss/eng-blocks-frontend-exemplar/assets/6669336/5c41ecfa-51c8-475f-964d-af733eb70d51\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvisprestidge%2Fpayload-cloud-storage-vercel-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarvisprestidge%2Fpayload-cloud-storage-vercel-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvisprestidge%2Fpayload-cloud-storage-vercel-adapter/lists"}