/nestjs-aws-s3-storage

This repos is dedicated for file upload to an S3 bucket on AWS using NestJS

Primary LanguageTypeScriptMIT LicenseMIT

Nest Logo

Description

A repository for using AWS S3 file upload with NestJS.

Installation

$ npm install

Running the app

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

App will be running on port 5000

File upload in NestSJ

To handle file uploading, Nest provides a built-in module based on the multer middleware package for Express.

Multer handles data posted in the multipart/form-data format, which is primarily used for uploading files via an HTTP POST request.

This module is fully configurable and you can adjust its behavior to your application requirements.

Using Postman

We only have a one single POST route in this demo, which is /aws.

Using Postman

To access the file path on AWS, we only need to get the location from the response body.

Links