Multer storage engine for Firebase Cloud Storage. Current stable version 4.1.2, updated monthly. Provides a seamless way to upload files directly to Firebase Storage using Multer in Express.js apps. Supports unique filenames, public URLs, custom directory paths, name prefixes/suffixes, and lifecycle hooks. Ships TypeScript definitions. Only supports CommonJS require; no ESM exports.
npm install multer-firebase-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up an Express.js POST route that accepts a single file upload and stores it in Firebase Cloud Storage using Multer.
Use CommonJS require(): const FirebaseStorage = require('multer-firebase-storage')Provide credentials as object with clientEmail, privateKey, projectId.
Use environment variable with proper escaping, e.g., process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n')
Rely only on unique: true for uniqueness, not on hash format.
Run npm install firebase-admin alongside this package.
npm install multer-firebase-storage
Ensure FirebaseStorage({ bucketName: '...', credentials: {...} }) is called with correct config object.Pass appName option to FirebaseStorage() to use a separate app instance.