New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

asinode-fileupload

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asinode-fileupload

Component takes request and response as parameters. File can be stored locally on the webserver or can be read using busboy and uploaded to azure.

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

asinode-fileupload

Component takes request and response as parameters. File can be stored locally on the webserver or can be read using busboy and uploaded to azure.

Installation

To install this Component, run yarn add asinode-fileupload or npm install --save asinode-fileupload.

Setup

  // Import the component
  const FileUpload = require('asinode-fileupload')

  // Setup for local storage..
  FileUpload.setup('<folder-path>')

  // ..or Setup for Azure
  const AzureStorageConfig = path.resolve(__dirname, '../storageConfig.json')
  FileUpload.setup(AzureStorageConfig, '<container-name>')

Usage

  // Setup server endpoint
  server.post('/upload', function (req, res) {
    FileUpload.handleUpload(req, res, successResponse)
  })

  // Success response (optional)
  function successResponse(res){
    res.writeHead(200)
    res.end('Upload complete!')
  }

Keywords

Asitis

FAQs

Package last updated on 27 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts