This package has been deprecated

Author message:

Package deprecated

excel-upload

1.6.9 • Public • Published

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

Key Description
req req express.js object
fileName name of the uploaded file
fileLocation location where uploaded file is stored
fieldName field name specified in the form

Package Sidebar

Install

npm i excel-upload

Weekly Downloads

16

Version

1.6.9

License

ISC

Unpacked Size

4.03 kB

Total Files

3

Last publish

Collaborators

  • adnans