Skip to main content
Every. Single. Project. Filejar removes this burden entirely. Upload files with one simple API call—zero infrastructure configuration, zero security setup, zero CORS complications. It simply works, immediately, in any environment. This library offers easy access to the Filejar REST API from server-side TypeScript or JavaScript applications.

It’s that simple

Upload a file in just a few lines:
import Filejar from 'filejar';

const filejar = new Filejar({
  apiKey: process.env.FILEJAR_API_KEY,
});

// Upload a file
const result = await filejar.upload.uploadFile([file]);
const fileUrl = `https://cdn.filejar.dev/${result.response[0].key}`;

// Done! Your file is live on CDN
S3 setup is overwhelming:
  • Define IAM roles and policies
  • Configure CORS for browser-based uploads
  • Manually create presigned URLs
  • Manage bucket permissions and security settings
  • Coordinate multiple environments (dev, staging, prod)
  • Troubleshoot CORS problems across different browsers
  • Build robust access control mechanisms
  • Establish lifecycle management policies
  • Integrate with CDN services
  • Account for error scenarios and retry logic
Securing S3 requires constant attention:
  • Design IAM policies adhering to least privilege principles
  • Verify presigned URL expiration works as expected
  • Block unauthorized access attempts
  • Enforce file type and size restrictions
  • Add rate limiting protection
  • Configure comprehensive logging and monitoring
  • Apply security headers appropriately
  • Safely store and manage secrets and credentials
No configuration. No setup. Just upload and go.

Backend Recipes

Filejar works seamlessly with popular Node.js frameworks: