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

@feathers-baas/plugin-files

v0.2.2

Published

Files service plugin for feathers-baas — local, S3, and GCS storage drivers

Readme

@feathers-baas/plugin-files

File storage plugin for feathers-baas — local filesystem, AWS S3, and Google Cloud Storage drivers.

Installation

pnpm add @feathers-baas/plugin-files

Setup

Call configureFiles in your app bootstrap after database and auth configuration:

import { configureFiles, LocalDriver } from '@feathers-baas/plugin-files'

configureFiles(app, {
  driver: new LocalDriver({
    directory: './uploads',
    jwtSecret: config.jwtSecret,
    baseUrl: 'http://localhost:3030',
  }),
  driverType: 'local',
  bucket: 'uploads',
  maxFileSize: 52_428_800,           // 50 MB (default)
  allowedMimeTypes: ['image/png', 'image/jpeg', 'application/pdf'], // optional
})

Then run the migration to create the files table:

pnpm migrate

Drivers

Local filesystem

import { LocalDriver } from '@feathers-baas/plugin-files'

new LocalDriver({
  directory: './uploads',
  jwtSecret: config.jwtSecret,
  baseUrl: 'http://localhost:3030',
})

AWS S3 (+ MinIO, LocalStack)

import { S3Driver } from '@feathers-baas/plugin-files'

new S3Driver({
  bucket: 'my-bucket',
  region: 'us-east-1',
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,
  secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
  // endpoint: 'http://localhost:9000',  // MinIO
  // forcePathStyle: true,               // required for MinIO
})

Google Cloud Storage

import { GCSDriver } from '@feathers-baas/plugin-files'

new GCSDriver({
  bucket: 'my-gcs-bucket',
  // keyFilename: '/path/to/service-account.json',  // or use ADC
})

API

| Method | Path | Description | |----------|--------------|------------------------------------| | POST | /files | Upload a file (multipart/form-data) | | GET | /files | List file records (paginated) | | GET | /files/:id | Get a file record | | PATCH | /files/:id | Update metadata | | DELETE | /files/:id | Delete record + binary |

All endpoints require a valid JWT. Uploads are streamed directly to the driver with no temporary buffering.

Upload example

curl -X POST http://localhost:3030/files \
  -H "Authorization: Bearer $TOKEN" \
  -F "[email protected]"

Only the metadata field is patchable after upload. Deleting a file record also deletes the binary from the storage driver.

Plugin interface

This package exports a FeathersBaasPlugin default export and is auto-discovered by @feathers-baas/core when listed as a dependency. The configureFiles() function must be called manually since it requires driver configuration.

License

MIT