All Projects → ungoldman → nano-s3

ungoldman / nano-s3

Licence: ISC license
Upload a file to S3.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nano-s3

magento-s3
Use Amazon S3 as the file storage solution for your Magento store
Stars: ✭ 62 (+37.78%)
Mutual labels:  s3
nestjs-storage
Nestjs file system / file storage module wrapping flydrive
Stars: ✭ 92 (+104.44%)
Mutual labels:  s3
Arduino
🚀 Proyectos de todo tipo para arduino utilizando sus sensores y actuadores. 🤖
Stars: ✭ 27 (-40%)
Mutual labels:  nano
s3-example
Simple example using micro for uploading stuff to AWS S3.
Stars: ✭ 45 (+0%)
Mutual labels:  s3
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+42.22%)
Mutual labels:  s3
lamba-thumbnailer
AWS S3 Video Thumbnailer with Lambda
Stars: ✭ 21 (-53.33%)
Mutual labels:  s3
ledger-app-nano
Ledger Nano X, Nano S & Blue applications for NANO and derivative coins
Stars: ✭ 34 (-24.44%)
Mutual labels:  nano
data-transfer-hub
Seamless User Interface for replicating data into AWS.
Stars: ✭ 102 (+126.67%)
Mutual labels:  s3
flutter aws s3 client
A simple, unofficial AWS S3 client
Stars: ✭ 24 (-46.67%)
Mutual labels:  s3
RaiBlocksPHP
A bunch of PHP methods to build and sign transactions
Stars: ✭ 20 (-55.56%)
Mutual labels:  nano
sls-photos-upload-service
Example web app and serverless API for uploading photos and saving to S3 and DynamoDB
Stars: ✭ 50 (+11.11%)
Mutual labels:  s3
backup-repository
Backup storage for E2E GPG-encrypted files, with multi-user, quotas, versioning, using a object storage (S3/Min.io/GCS etc.) and deployed on Kubernetes or standalone.
Stars: ✭ 21 (-53.33%)
Mutual labels:  s3
skbn
Copy files and directories between Kubernetes and cloud storage
Stars: ✭ 68 (+51.11%)
Mutual labels:  s3
hub
Public reusable components for Polyaxon
Stars: ✭ 8 (-82.22%)
Mutual labels:  s3
s3-credentials
A tool for creating credentials for accessing S3 buckets
Stars: ✭ 138 (+206.67%)
Mutual labels:  s3
ndstore
code for storing neurodata images and image annotations
Stars: ✭ 39 (-13.33%)
Mutual labels:  s3
terraform-aws-s3
Terraform module to create default S3 bucket with logging and encryption type specific features.
Stars: ✭ 22 (-51.11%)
Mutual labels:  s3
TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an Arduino, such as Nano, UNO, Mega, etc. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behavin…
Stars: ✭ 76 (+68.89%)
Mutual labels:  nano
s3-fuzzer
🔐 A concurrent, command-line AWS S3 Fuzzer. Written in Go.
Stars: ✭ 43 (-4.44%)
Mutual labels:  s3
backbeat
Zenko Backbeat is the core engine for asynchronous replication, optimized for queuing metadata updates and dispatching work to long-running tasks in the background.
Stars: ✭ 51 (+13.33%)
Mutual labels:  s3

nano-s3 stability

npm version build status downloads js-standard-style

Upload a file to S3.

About

Sometimes you just need a small lib to do a simple task.

  • uploads a file to s3
  • that's it
  • no other features
  • very small!
    • 7.4 KB unpacked
    • compare to aws-sdk's 30.7 MB

Thanks to toddself for providing the original code that this was adapted from!

Installation

npm install nano-s3

Usage

const fs = require('fs')
const path = require('path')
const nanoS3 = require('nano-s3')

const options = {
  // AWS Config
  // Environment variables strongly recommended for keys
  accessKeyId: 'abc',
  secretAccessKey: 'xyz',

  // protocol is optional, defaults to https
  protocol: 'https',
  host: 's3.us-west-1.amazonaws.com',
  bucket: 'your-bucket-name',

  // Name of uploaded file on S3
  filename: 'image.jpg',

  // MIME type of file
  contentType: `image/jpeg`,

  // File data (Should be a Buffer)
  data: fs.readFileSync(path.join(__dirname, 'image.jpg')),

  // Directory path in bucket (optional)
  path: 'path/in/bucket',

  // Max file size, default 2MB (optional).
  // Required by AWS for upload policy.
  maxFileSize: 2 * 1024 * 1024
}

nanoS3(options, function (err, res) {
  if (err) throw err
  console.log(res.statusCode, res.statusMessage)
})

API

nanoS3(options, cb)

Params:

  • options - Object:
    • accessKeyId - String: AWS access key ID with write access to the host and bucket.
    • secretAccessKey - String: AWS secret access key for signing.
    • protocol - String: protocol to use for AWS URL. Default: 'https'.
    • host - String: AWS host to upload the files to, e.g. s3.us-west-1.amazonaws.com.
    • bucket - String: Your AWS bucket name.
    • filename - String: Name of file to upload.
    • contentType - String: MIME type of file.
    • data - Buffer: File data. Should be a Buffer.
    • path - String: Path in bucket to upload to (optional). Default: none (root).
    • maxFileSize - Number: Max file size (optional). Default: 2MB (2 * 1024 * 1024).
  • cb - Function:
    • err - Error: null if everything went fine, Error object if something went wrong.
    • res - Response: http response object.

License

ISC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].