npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strapi5-provider-upload-ftp

v1.0.4

Published

A Strapi plugin for uploading files to an FTP server

Readme

Strapi 5 FTP Upload Provider

This is a Strapi 5 provider plugin that allows you to upload media files via FTP. For better organization, it will automatically create year and month folders inside your FTP server.

Features

  • Uploads media files to an FTP server.

  • Automatically creates year and month directories for file organization:

    • 2024
      • 01 (January)
      • 02 (February)
    • 2025
      • 01 (January)
      • 02 (February)
  • Allows you to set a custom path for organizing files on your FTP server (optional).

Why Use an FTP Provider?

  • Simple to Set Up: FTP is easy to configure and widely supported by most web hosts.
  • No Bandwidth Limits: Unlike cloud services that charge based on storage and data transfer, FTP typically offers unlimited bandwidth (depending on your hosting plan).
  • Custom Domain: You can use your own domain (e.g., images.yourwebsite.com) to serve media, enhancing your branding and control.
  • Cloudflare Integration: Easily put Cloudflare in front of your FTP server to improve security, performance, and caching for faster delivery of media.

Installation

To install this plugin in your Strapi project, run the following command:

npm install strapi5-provider-upload-ftp --save

Configuration

After installing the plugin, you need to configure it in the config/plugins.js file. If this file doesn't already exist, create it. This file should contain the following information:

module.exports = ({ env }) => ({
  upload: {
    config: {
      provider: 'strapi5-provider-upload-ftp',
      providerOptions: {
        host: env('FTP_HOST'),
        port: env.int('FTP_PORT', 21),
        user: env('FTP_USER'),
        password: env('FTP_PASSWORD'),
        publicUrl: env('FTP_PUBLIC_URL'),
        ftp_custom_path: env('FTP_CUSTOM_PATH', ''),
        secure: env.bool('FTP_SECURE', false),
        passive: env.bool('FTP_PASSIVE', true),
      },
    },
  },
});

Security Middleware Configuration

Because of Strapi's default security settings, you need to change the contentSecurityPolicy configuration to properly view thumbnails in the Media Library. Instead of using the strapi::security setting, replace it with the object below, as described in the middleware configuration.

export default [
  'strapi::logger',
  'strapi::errors',
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': [
            "'self'",
            'data:',
            'blob:',
            'yourwebsite.com',
          ],
          'media-src': [
            "'self'",
            'data:',
            'blob:',
            'yourwebsite.com',
          ],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  'strapi::cors',
  'strapi::poweredBy',
  'strapi::query',
  'strapi::body',
  'strapi::session',
  'strapi::favicon',
  'strapi::public',
];

Environment Variables

You will also need to create a .env file with the following information (replace the values with your own FTP credentials):

FTP_HOST=ftp.yourserver.com
FTP_PORT=21
FTP_USER=your-ftp-username
FTP_PASSWORD=your-ftp-password
FTP_PUBLIC_URL=https://yourwebsite.com
FTP_CUSTOM_PATH=uploads/images # Optional: Set a custom folder path
FTP_SECURE=false # Set to true if you want to use FTPS (FTP over SSL/TLS)
FTP_PASSIVE=true # Use passive mode (recommended for most firewalls)

Testing

The plugin has been tested and works with Strapi v5.4.1 and Node.js v20.15.1.