Skip to content

Plugins

Plugins provide the processing capabilities that power flow nodes. While nodes define what operations to perform (resize, scan, extract text), plugins provide how those operations are executed.

Think of it this way:

  • Nodes = The recipe (resize to 800x600, convert to WebP)
  • Plugins = The kitchen equipment (Sharp library, ClamAV scanner)
┌─────────────────────────────────────────────────────────┐
│ Your Flow │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Input │ → │ Resize │ → │ Optimize │ → Output │
│ │ Node │ │ Node │ │ Node │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────┘
↓ requires
┌─────────────────────────────────────────────────────────┐
│ Plugin Layer │
│ ┌─────────────────────────────────────────────────┐ │
│ │ imagePlugin (Sharp) │ │
│ │ Provides: resize(), optimize(), transform() │ │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
Package TypePurposeExample
Node packagesDefine node types and parameters@uploadista/flow-images-nodes
Plugin packagesProvide processing implementation@uploadista/flow-images-sharp

You need both: nodes define what to do, plugins do the work.

CategoryNode PackagePlugin Packages
Images@uploadista/flow-images-nodesflow-images-sharp, flow-images-photon, flow-images-replicate
Documents@uploadista/flow-documents-nodesflow-documents-plugin (recommended), flow-documents-pdflib, flow-documents-unpdf, flow-documents-replicate
Videos@uploadista/flow-videos-nodesflow-videos-av-node
Security@uploadista/flow-security-nodesflow-security-clamscan
Utility@uploadista/flow-utility-nodesflow-utility-zipjs
PluginBest ForEnvironmentSpeed
imagePluginFull-featured processingNode.jsFast (50-100ms)
imagePluginNodeEdge/serverlessCloudflare Workers, DenoFastest (5-10ms)
imageAiPluginAI operationsAny (API-based)Slow (5-20s)
PluginBest ForOperations
documentPluginMost use cases (recommended)Split, merge, metadata, text extraction
pdfLibDocumentPluginPDF manipulation onlySplit, merge, metadata
unpdfDocumentPluginText extraction onlyFast text extraction
documentAiPluginScanned documentsOCR, AI extraction
PluginBest ForRequirements
videoPluginAll video operationsNone (FFmpeg bundled)
PluginBest ForRequirements
virusScanPluginVirus scanningClamAV installed
npm install @uploadista/flow-images-nodes @uploadista/flow-images-sharp
import { createUploadistaServer } from "@uploadista/server";
import { imagePlugin } from "@uploadista/flow-images-sharp";
const uploadista = await createUploadistaServer({
dataStore: s3Store({ /* ... */ }),
kvStore: redisKvStore({ /* ... */ }),
// Add plugins here
plugins: [
imagePlugin(),
],
});

Most plugins work out of the box. Some require configuration:

import { createUploadistaServer } from "@uploadista/server";
import { imagePlugin } from "@uploadista/flow-images-sharp";
import { imageAiPlugin } from "@uploadista/flow-images-replicate";
import { documentAiPlugin } from "@uploadista/flow-documents-replicate";
const uploadista = await createUploadistaServer({
// ...
plugins: [
imagePlugin(),
imageAiPlugin(process.env.REPLICATE_API_TOKEN),
documentAiPlugin({ apiToken: process.env.REPLICATE_API_TOKEN }),
],
});
import { createUploadistaServer } from "@uploadista/server";
import { virusScanPlugin } from "@uploadista/flow-security-clamscan";
const uploadista = await createUploadistaServer({
// ...
plugins: [
virusScanPlugin({
preference: "clamdscan", // Use daemon for better performance
clamdscan_socket: "/var/run/clamav/clamd.sock",
}),
],
});

Add multiple plugins to handle different file types:

import { createUploadistaServer } from "@uploadista/server";
import { imagePlugin } from "@uploadista/flow-images-sharp";
import { imageAiPlugin } from "@uploadista/flow-images-replicate";
import { videoPlugin } from "@uploadista/flow-videos-av-node";
import { documentPlugin } from "@uploadista/flow-documents-plugin";
import { virusScanPlugin } from "@uploadista/flow-security-clamscan";
const uploadista = await createUploadistaServer({
dataStore: s3Store({ /* ... */ }),
kvStore: redisKvStore({ /* ... */ }),
plugins: [
// Image processing
imagePlugin(),
imageAiPlugin(process.env.REPLICATE_API_TOKEN),
// Video processing
videoPlugin(),
// Document processing (combined plugin recommended)
documentPlugin,
// Security
virusScanPlugin(),
],
});

When a required plugin is missing, you’ll get a clear error:

Error: Service not found: ImagePlugin

This means you need to:

  1. Install the plugin package (npm install @uploadista/flow-images-sharp)
  2. Add it to your server plugins array

For detailed plugin documentation including installation, configuration, and node requirements, see the specific flow pages: