/upload-to-s3-bucket

upload various file types to s3 with aws-sdk

Primary LanguageJavaScript

upload to s3 bucket 🆙 (in progress)

This repository contains functions for uploading various file types to an Amazon S3 bucket.

MIT License

Run Locally 🚀

Clone the project

git clone https://github.com/ruveydayilmaz/upload-to-s3-bucket.git

Go to the project directory

cd upload-to-s3-bucket

Install dependencies

npm install

Start the server

npm start

API Reference

Upload audio file

  POST /upload-audio
Param Type Description
file file Important. Request body must be a form data

Upload zip file

  POST /upload-zip
Param Type Description
file file Important. Request body must be a form data

Upload image file

  POST /upload-image
Param Type Description
file file Important. Request body must be a form data

Upload video file with Multipart

  POST /upload-video
Param Type Description
file file Important. Request body must be a form data

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

bucket

And add a file named aws-config.json to the root. Then add the following variables to your json file

accessKeyId secretAccessKey region

Features

  • Upload large videos to s3 bucket with multipart upload
  • Zip file from request
  • Upload audio, image and zip files to s3 bucket