SFTP storage adapter

SFTP adapter for storing files in Payload CMS using cloud storage.

Community 2 21/wk MIT v1.0.1

Installation

pnpm add payloadcms-sftp-storage

About

The SFTP storage adapter integrates with Payload CMS to store files remotely via SFTP. It acts as an extension of the cloud storage capabilities offered by Payload, allowing users to configure their collections to upload files to external servers. Users can specify connection options such as host, username, and authentication methods, including both private keys and passwords. To configure the SFTP adapter, users will modify their `payload.config.ts`, adding the adapter and specifying options like `destinationPathRoot` for file storage and `publicEndpoint` for accessibility. Files uploaded to a collection will be stored in a predefined directory structure on the remote server, reflecting the collection’s slug in the filepath. If an entry is deleted in Payload, the corresponding file will also be removed from the remote storage. This adapter leverages the `ssh2-sftp-client` for efficient SFTP operations and is compatible with other cloud storage configurations within Payload. Essential configurations can be managed through environment variables, simplifying the integration process.

Package info

Package name
payloadcms-sftp-storage
Latest version
1.0.1
Unpacked size
7 kB
License
MIT
Weekly downloads
21
Last publish
Apr 6, 2024

More from DrMint

View profile

Similar plugins

More in Storage