BucketKit
Core Package

Core Package

Backend utilities for S3 uploads

@nilovon/bucketkit-core

The core package provides backend utilities for handling S3 uploads in Node.js applications.

Features

  • Presigned URLs - Generate secure upload URLs
  • Validation - Validate file size, type, and custom rules
  • Path Resolution - Organize files with custom path patterns
  • Error Handling - Typed errors for easy handling

Installation

pnpm add @nilovon/bucketkit-core

Quick Start

import { createBucketKit } from '@nilovon/bucketkit-core';

const bucketKit = createBucketKit({
  provider: 'aws-s3',
  region: 'us-east-1',
  bucket: 'my-uploads',
});

const result = await bucketKit.createPresignedUpload({
  fileName: 'photo.jpg',
  contentType: 'image/jpeg',
  size: 1024000,
});

Next Steps

On this page