0.5.0 • Published 10 months ago

dugg v0.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 months ago

Dugg file sending and manipulation

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

INSTALLATION

npm i dugg

USAGE

On your Node.js server:

/**
 * 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.

0.5.0

10 months ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

3 years ago

0.1.11

4 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.1

7 years ago