1.7.9 • Published 3 years ago

@admoni/upload-module v1.7.9

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Upload file module

Installation

npm install --save @admoni/upload-module

Usage

const uploadFile = require("@admoni/upload-module")
app.post('/upload', uploadFile(directory, process.env.ID, process.env.SECRET, filetype).single | array | fields, function(req, res, next) {
  res.send('Successfully uploaded ' + req.file.location + ' files!')
  // File - req.file.location
  // Filetype can be image/png, image/gif, image/jpg, application/zip e.t.c
})

// To delete a file
const { deleteFile } = require("@admoni/upload-module")
deleteFile(ID, SECRET, files)
// files is an array of Object, with Key as the key and req.file.key as the value
1.7.9

3 years ago

1.6.9

3 years ago

1.5.9

3 years ago

1.4.9

3 years ago

1.3.9

3 years ago

1.2.9

3 years ago

1.1.9

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago