# dugg

> File toolkit for node and networks

Latest version **0.5.0** (published 2024-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install dugg
pnpm add dugg
yarn add dugg
bun add dugg
```

## 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.5.0 |
| Published | 2024-08-31 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vidar Eldøy |
| Maintainers | eldoy |

## Links

- npm: https://www.npmjs.com/package/dugg
- Repository: https://github.com/eldoy/dugg
- Homepage: https://github.com/eldoy/dugg#readme
- Issues: https://github.com/eldoy/dugg/issues
- npm.io page: https://npm.io/package/dugg

## Dependencies (3)

- [jimp](https://npm.io/package/jimp.md) ^0.22.7
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.35
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.637.0

## Recent versions

- 0.5.0 (latest) — 2024-08-31
- 0.4.0 — 2023-11-24
- 0.3.0 — 2023-04-14
- 0.2.0 — 2022-07-24
- 0.1.11 — 2021-09-06
- 0.1.10 — 2020-11-04
- 0.1.9 — 2020-10-11
- 0.1.8 — 2020-10-10
- 0.1.7 — 2019-10-10
- 0.1.6 — 2019-10-10
- 0.1.5 — 2019-09-25
- 0.1.4 — 2019-09-10
- 0.1.3 — 2019-09-10
- 0.1.2 — 2019-09-10
- 0.1.0 — 2019-09-08
- … 1 more at https://npm.io/package/dugg/versions

## README

# Dugg file sending and manipulation

Upload, download, convert and analyze files toolkit for NodeJS.

### INSTALLATION
```npm i dugg```

### USAGE
On your Node.js server:
```javascript
/**
 * Setup. Showing default options
 */
var dugg = require('dugg')({
  key: 'amazon_key',
  secret: 'amazon_secret',
  bucket: 'amazon_bucket'
})

// Example file structure
// Get this from a file upload in the browser or from your hard drive
var files = [{
  size: 165888,
  path: 'filepath',
  name: 'filename',
  type: 'image/png',
  lastModifiedDate: new Date('2019-07-31T08:00:19.944Z')
}]

/**
 * Upload file
 */
var urls = await dugg.upload(files)

/**
 * Download file
 */
var result = await dugg.download('http://url-to/your-file.jpg')

/**
 * Convert file
 */

// Jimp options, use 'auto' for Jimp.AUTO
var config = {
  resize: [120, 120],
  greyscale: []
}
await dugg.convert(files, config)

/**
 * Get file info
 * Needs exiftool installed
 */
var info = dugg.info('path')
```
Enjoy! MIT Licensed.

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