# aws-file-upload

> Uploading files to S3

Latest version **0.2.4** (published 2020-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-file-upload
pnpm add aws-file-upload
yarn add aws-file-upload
bun add aws-file-upload
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2020-12-04 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 35.3 KB |
| Known vulnerabilities | 0 (+16 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aldy Cavalera |
| Maintainers | aldycavaleraa |
| Keywords | s3, media, upload, s3, upload |

## Links

- npm: https://www.npmjs.com/package/aws-file-upload
- Repository: https://github.com/aldycavalera/s3-upload-files
- Homepage: https://github.com/aldycavalera/s3-upload-files#readme
- Issues: https://github.com/aldycavalera/s3-upload-files/issues
- npm.io page: https://npm.io/package/aws-file-upload

## Dependencies (16)

- [mime](https://npm.io/package/mime.md) ^2.4.6
- [sharp](https://npm.io/package/sharp.md) ^0.26.2
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [ffmpeg](https://npm.io/package/ffmpeg.md) 0.0.4
- [multer](https://npm.io/package/multer.md) ^1.4.2
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.787.0
- [express](https://npm.io/package/express.md) ^4.17.1
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.7
- [child_process](https://npm.io/package/child_process.md) ^1.0.2
- [fluent-ffmpeg](https://npm.io/package/fluent-ffmpeg.md) ^2.1.2
- [get-video-info](https://npm.io/package/get-video-info.md) ^1.0.0
- [source-map-loader](https://npm.io/package/source-map-loader.md) ^1.1.2
- [get-video-dimensions](https://npm.io/package/get-video-dimensions.md) ^1.0.0
- [@ffmpeg-installer/ffmpeg](https://npm.io/package/@ffmpeg-installer/ffmpeg.md) ^1.0.20
- [awesome-typescript-loader](https://npm.io/package/awesome-typescript-loader.md) ^5.2.1
- [@ffprobe-installer/ffprobe](https://npm.io/package/@ffprobe-installer/ffprobe.md) ^1.1.0

## Recent versions

- 0.2.4 (latest) — 2020-12-04
- 0.1.4 — 2020-11-18
- 0.1.38 — 2020-11-18

## README

# S3 Upload Files

S3 Upload files is a NodeJS application for uploading files to S3 with ease.

## Prerequisite

- S3 Upload files requires [Node.js](https://nodejs.org/) v10+ to run.
- A configuration for s3 such as Secret Key, Key ID, Bucket name, etc\
  Create a new file called .env and paste it. You may need to fill it with your own credentials

  ```sh
  PORT="3000"
  ACCESS_KEY_ID="ACCESS_KEY_ID"
  SECRET_ACCESS_KEY="SECRET_ACCESS_KEY"
  BUCKET_NAME="BUCKET_NAME"
  REGION="ap-southeast-1"
  ```

## Installation

### Local Development

Clone this repository

```sh
git clone https://github.com/aldycavalera/s3-upload-files.git
```

Then install all the dependencies

```sh
$cd s3-upload-files
$npm install
```

Create a new file inside of s3-upload-files/dist folder, name it to server.js or whatever you want. Then create your own development server by pasting this code:

```sh
const dotenv = require("dotenv");
dotenv.config();
const express = require("express");
const index = require("./index");

const upload = new index.Uploader();
const app = express();
const port = process.env.PORT;
const bodyPraser = require("body-parser");

app.use(
  bodyPraser.urlencoded({
    extended: false,
  })
);
app.listen(port);
console.log("\x1b[32m", `Server listening on port ${port}`);
upload.upload(app);
```

Start development server

```sh
$node ./dist/server.js
```

### Deploy to Live Server

To deploy this package to your own hosting provider, please see [DEPLOYMENT.md](https://github.com/aldycavalera/s3-upload-files/blob/main/DEPLOYMENT.md)

## License

---

MIT

---
_Source: https://npm.io/package/aws-file-upload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
