DrMint

payloadcms ftp storage

by DrMint
Cloud storage
v?

Overview

Summary generated from the README

Provides an FTP adapter for the Payload cloud-storage plugin, built on the basic-ftp library. Uploads for a collection are sent to a subfolder named after the collection slug on the FTP server and served from a configured public endpoint. Deleting an entry also removes the remote file, and uploads with an existing name overwrite the original.

Features

  • Adapter for the Payload cloud-storage plugin using basic-ftp
  • Configurable host, user, password and secure connection
  • Stores files in a subfolder named after the collection slug
  • Public URLs built from a configurable endpoint
  • Deletes the remote file when the entry is deleted

Use cases

  • Store media uploads on an existing FTP hosting account instead of local disk
  • Serve large video files from a separate remote server while managing them in Payload

From the author

FTP adapter for Payload CMS's plugin-cloud-storage plugin

Installation

npm i payloadcms-ftp-storage

1

Stars

0

Forks

0

Open Issues

2 years ago

Last Updated

11

Weekly Downloads

v1.0.2

npm Version

5.7 KB

Unpacked Size

2

Dependencies

GitHub stars

10 since Sep 7

Show data
GitHub stars by day (UTC)
DateStars
Dec 6, 20261
Dec 5, 20261
Dec 4, 20261
Dec 3, 20261
Dec 2, 20261
Dec 1, 20261
Nov 30, 20261
Nov 29, 20261
Nov 28, 20261
Nov 27, 20261
Nov 26, 20261
Nov 25, 20261
Nov 24, 20261
Nov 23, 20261
Nov 22, 20261
Nov 21, 20261
Nov 20, 20261
Nov 19, 20261
Nov 18, 20261
Nov 17, 20261
Nov 16, 20261
Nov 15, 20261
Nov 14, 20261
Nov 13, 20261
Nov 12, 20261
Nov 11, 20261
Nov 10, 20261
Nov 9, 20261
Nov 8, 20261
Nov 7, 20261
Nov 6, 20261
Nov 5, 20261
Nov 4, 20261
Nov 3, 20261
Nov 2, 20261
Nov 1, 20261
Oct 31, 20261
Oct 30, 20261
Oct 29, 20261
Oct 28, 20261
Oct 27, 20261
Oct 26, 20261
Oct 25, 20261
Oct 24, 20261
Oct 23, 20261
Oct 22, 20261
Oct 21, 20261
Oct 20, 20261
Oct 19, 20261
Oct 18, 20261
Oct 17, 20261
Oct 16, 20261
Oct 15, 20261
Oct 14, 20261
Oct 13, 20261
Oct 12, 20261
Oct 11, 20261
Oct 10, 20261
Oct 9, 20261
Oct 8, 20261
Oct 7, 20261
Oct 6, 20261
Oct 5, 20261
Oct 4, 20261
Oct 3, 20261
Oct 2, 20261
Oct 1, 20261
Sep 30, 20261
Sep 29, 20261
Sep 28, 20261
Sep 27, 20261
Sep 26, 20261
Sep 25, 20261
Sep 24, 20261
Sep 23, 20261
Sep 22, 20261
Sep 21, 20261
Sep 20, 20261
Sep 19, 20261
Sep 18, 20261
Sep 17, 20261
Sep 16, 20261
Sep 15, 20261
Sep 14, 20261
Sep 13, 20261
Sep 12, 20261
Sep 11, 20261
Sep 10, 20261
Sep 9, 20261
Sep 8, 20261
Sep 7, 20261
npm weekly downloads

12+8 since Sep 7

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 202612
Dec 5, 202610
Dec 4, 20262
Dec 3, 20263
Dec 2, 20264
Dec 1, 20266
Nov 30, 20267
Nov 29, 20269
Nov 28, 20269
Nov 27, 20269
Nov 26, 20268
Nov 25, 20268
Nov 24, 20266
Nov 23, 20266
Nov 22, 20265
Nov 21, 20265
Nov 20, 20268
Nov 19, 20269
Nov 18, 20268
Nov 17, 20268
Nov 16, 20268
Nov 15, 20266
Nov 14, 20266
Nov 13, 20263
Nov 12, 20266
Nov 11, 20266
Nov 10, 20267
Nov 9, 20267
Nov 8, 20268
Nov 7, 20268
Nov 6, 20267
Nov 5, 20263
Nov 4, 20263
Nov 3, 20263
Nov 2, 20265
Nov 1, 20266
Oct 31, 20266
Oct 30, 20266
Oct 29, 20266
Oct 28, 20266
Oct 27, 20266
Oct 26, 20264
Oct 25, 20266
Oct 24, 20266
Oct 23, 20266
Oct 22, 20267
Oct 21, 20267
Oct 20, 20266
Oct 19, 20265
Oct 18, 20261
Oct 17, 20262
Oct 16, 20262
Oct 15, 20262
Oct 14, 20262
Oct 13, 20262
Oct 12, 20262
Oct 11, 20263
Oct 10, 20262
Oct 9, 20262
Oct 8, 20261
Oct 7, 20261
Oct 6, 20261
Oct 5, 20261
Oct 4, 20260
Oct 3, 20261
Oct 2, 20263
Oct 1, 20263
Sep 30, 20263
Sep 29, 20267
Sep 28, 20267
Sep 27, 20267
Sep 26, 202610
Sep 25, 20268
Sep 24, 20268
Sep 23, 20268
Sep 22, 20267
Sep 21, 20268
Sep 20, 202610
Sep 19, 20266
Sep 18, 20266
Sep 17, 20267
Sep 16, 20268
Sep 15, 20265
Sep 14, 20266
Sep 13, 20264
Sep 12, 20264
Sep 11, 20264
Sep 10, 20263
Sep 9, 20263
Sep 8, 20263
Sep 7, 20264

Each point is npm's rolling 7-day download count.

Health Score

30/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/782695872-root.svg)](https://payloaddirectory.dev/plugins/782695872-root)
HTML
<a href="https://payloaddirectory.dev/plugins/782695872-root"><img src="https://payloaddirectory.dev/badge/782695872-root.svg" alt="Payload Directory"></a>
Updated Apr 6, 2024Created Apr 5, 2024Published Apr 5, 2024

README

PayloadCMS FTP Storage Adapter

FTP adapter for Payload CMS's plugin-cloud-storage plugin

This adapter uses basic-ftp to handle the FTP operations.

Usage

Let's say we have a Videos collection (which slug is "videos") and we want to store the uploads on a third-party remote storage using FTP.

At the top of your payload.config.ts file, add the following:

import { ftpAdapter } from "payloadcms-ftp-storage";

Then within the buildConfig add the following:

plugins: [
  cloudStorage({
    collections: {
      videos: {
          adapter: ftpAdapter({
            host: "ftp.domain.com",
            user: "ftpUser",
            password: "ftpUserPassword",
            secure: true,
            endpoint: "https://domain.com/videos",
        }),
        disableLocalStorage: true,
        disablePayloadAccessControl: true,
      },
    },
  }),
],

If we upload a video file name "my-video.mp4", the file will be uploaded at the home of "ftpUser" at "ftp.domain.com", in a subfolder named "videos" (because this is the slug of the collection) as a file with the same name as the original "my-video.mp4". In conclusion, the path of the transfered file will be ~/videos/my-video.mp4, and its public address will be https://domain.com/videos/my-video.mp4

Beware: when deleting an entry, the file will also be deleted on the remote storage. Also, if a file "my-video.mp4" already exists, and we try to upload another file with the same name, the original file will be overwritten.

Similar plugins