diff --git a/docs/modules/media.mdx b/docs/modules/media.mdx index 0e413da..f14f7b1 100644 --- a/docs/modules/media.mdx +++ b/docs/modules/media.mdx @@ -50,4 +50,31 @@ export default { } } } satisfies BkndConfig; -``` \ No newline at end of file +``` + +### Local adapter for development + +For local development and testing, you can use the local file system adapter. This is particularly useful when working with Node.js environments. + +```typescript bknd.config.ts +import { registerLocalMediaAdapter } from "bknd/adapter/node"; +import type { BkndConfig } from "bknd/adapter"; + +// Register the local media adapter +const local = registerLocalMediaAdapter(); + +export default { + initialConfig: { + media: { + enabled: true, + adapter: local({ + path: "./public/uploads", // Files will be stored in this directory + }), + } + } +} satisfies BkndConfig; +``` + +This configuration will store uploaded files in the specified directory, +making them accessible through your application's public path or whever +you choose.