A storage adapter that saves Payload upload files in a GitHub repository using the GitHub REST API via Octokit. Collections are enabled by slug, optionally with a path prefix, and local storage is automatically disabled for them. It needs the repository owner, repo name, optional branch (default main) and an access token.
Payload storage adapter for GitHub
Installation
npm i payload-storage-github9
Stars
1
Forks
0
Open Issues
1 years ago
Last Updated
0
Weekly Downloads
v1.0.1
npm Version
32.8 KB
Unpacked Size
2
Dependencies
Trends appear after 7 days of data. Daily snapshots have not started yet.
Trends appear after 7 days of data. Daily snapshots have not started yet.
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/887320325-root)<a href="https://payloaddirectory.dev/plugins/887320325-root"><img src="https://payloaddirectory.dev/badge/887320325-root.svg" alt="Payload Directory"></a>README
This package provides a way to use the GitHub REST API to store files with Payload.
pnpm add payload-storage-github
collections object to specify which collections should use the GitHub Storage adapter. The slug must match one of your existing collection slugs.disableLocalStorage to true for each collection.import { githubStorage } from 'payload-github-storage'
import { Media } from './collections/Media'
import { MediaWithPrefix } from './collections/MediaWithPrefix'
export default buildConfig({
collections: [Media, MediaWithPrefix],
plugins: [
githubStorage({
collections: {
[mediaSlug]: true,
[mediaWithPrefixSlug]: {
prefix: '/media',
},
},
owner: process.env.GITHUB_REPOSITORY_OWNER,
repo: process.env.GITHUB_REPOSITORY_NAME,
branch: process.env.GITHUB_REPOSITORY_BRANCH,
options: {
auth: process.env.GITHUB_ACCESS_TOKEN,
},
}),
],
})
| Option | Description | Default |
|---|---|---|
enabled | Whether or not to enable the plugin | true |
collections | Collections to apply the storage to | |
owner | The name of the repository owner (GitHub username or organization) | |
repo | The repository name | |
branch | Which branch to upload/read files | "main" |
options | Octokit client configuration. See Docs |
cloud storage
Official Payload plugin for storing uploads in third-party cloud storage through a pluggable adapter interface
100426.0k/wk45.4kv3
payload storage bunny
Storage adapter that keeps Payload uploads and video in Storage and Stream
821.6k/wk60v4
payload storage cloudinary
Cloudinary storage adapter that moves Payload uploads to Cloudinary with transformations, folders and private files
550/wk7v3
payload storage file explorer
Browse and manage S3-compatible bucket files from an admin view in Payload
460/wk12v3
payload nextcloud
Nextcloud storage adapter for Payload uploads over WebDAV with optional public share links
390/wk2v3
payload cloudinary plugin
Upload Payload media files to Cloudinary
390/wk77v2