🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@raincatcher/filestore

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@raincatcher/filestore

RainCatcher file storage server

latest
npmnpm
Version
1.1.2
Version published
Maintainers
6
Created
Source

RainCatcher FileStore

Server-side express module to support file uploads from the @raincatcher/filestore-client module.

Usage

In order to include this module in an existing express application, use the createRouter function and supply an implementation of the FileStorage interface.

import { createRouter, FileStorage, GridFsStorage } from '@raincatcher/filestore';

//...

const storage: FileStorage = new GridFsStorage(mongoDbConnectionUrl);
expressApp.use('/file', createRouter(storage));

FileStorage Interface

The FileStorage is an interface that should be implemented in order to supply an alternative place for file data to be transferred to, based on manipulating NodeJS Streams to allow storage and retrieval of the uploaded binary data.

Implementations

The current implementations support:

  • GridFS (MongoDB's API for storing larger files - GridFsStorage)
  • Amazon S3 (S3Storage)
  • Local file storage (LocalStorage)

See individual storage implementations for the list of required parameters.

FAQs

Package last updated on 18 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts