Skip to content

a simple library to parse your javascript multipart request

Notifications You must be signed in to change notification settings

nooballday/js-multipart-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-multipart-parser

This piece of code as the title says is a parser for multipart, inspired by https://scotch.io/bar-talk/handling-file-uploads-with-hapi-js

How to use it :

const UPLOAD_PATH = 'uploaded_file';
const fileOptions = { dest: `${UPLOAD_PATH}/` };
const uploader = require('./multipart-parser');

// save the file,
// the file could be single or multiple this snippet will decide it, so just dump it here
// it will capture detail of uploaded data
const fileDetails = await uploader(files, fileOptions);

console.log(fileDetails);

Important !! !! Make sure you allowed multipart request when receiveing files!

About

a simple library to parse your javascript multipart request

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published