npm.io
1.0.0 • Published 2d ago

@lucidcms/plugin-filesystem

Licence
MIT
Version
1.0.0
Deps
3
Size
75 kB
Vulns
0
Weekly
0
Stars
22

Lucid CMS - Filesystem Plugin

The official Filesystem storage plugin for Lucid CMS

This plugin registers a local filesystem media adapter and the upload/download routes used for signed direct uploads in Lucid CMS.

Installation

npm install @lucidcms/plugin-filesystem

Setup

import { configureLucid } from "@lucidcms/core";
import { node } from "@lucidcms/runtime-node";
import { filesystemPlugin } from "@lucidcms/plugin-filesystem";
import { sqlite } from "@lucidcms/db-sqlite";

export default configureLucid({
	runtime: node,
	db: sqlite,
	config: () => ({
		plugins: [
			filesystemPlugin({
				uploadDir: "uploads",
			}),
		],
	}),
});

Configuration

Property Type Description
uploadDir string Directory used to store uploaded files. Defaults to uploads.
secretKey string Secret used to sign filesystem media URLs. Defaults to the Lucid encryption secret.