1.6.9 • Published 4 years ago

excel-upload v1.6.9

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

excel-upload

A node.js module for uploading and converting excel files into JSON.

Installing

npm install excel-upload

Requirements

Usage

Uploading, storing and parsing files is done asynchronous and the result is returned as a Promise.

Don't forget the enctype="multipart/form-data" in your form.

Browser:

<form action="/upload-documents" method="post" enctype="multipart/form-data">
  <input type="file" name="document" />
</form>

Controller:

import uploadFile from 'excel-upload';
  
static async post(req, res, next) {
 
    const upload = await uploadFile(req, "document-name", "./uploaded", "document");
 
      res.json(upload);
  }

NOTE: Before using excel-upload, make sure you create a corresponding folder in the root where uploaded files will be stored ("./uploaded").

API

KeyDescription
reqreq express.js object
fileNamename of the uploaded file
fileLocationlocation where uploaded file is stored
fieldNamefield name specified in the form
1.6.9

4 years ago

1.5.9

4 years ago

1.4.9

4 years ago

1.3.9

4 years ago

1.2.9

4 years ago

1.1.9

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago

1.0.1

4 years ago