Skip to content

Collection of libraries and shortcuts for local file handling and carrecados with express.js (multer)

Notifications You must be signed in to change notification settings

codephi/handler-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Handler Files for Node.js Collection of libraries and shortcuts for local file handling and carrecados with express.js (multer)

Express

var upload = require('./index').upload,
    express = require('express'),
    app = express()

app.listen('4040');

app.post('/', function(req, res) {
    upload(req, res).files('avatar').then((file) => {
        res.send(file)
    })
});

Local

var local = require('').local

local.dir('./uploads') //List all
local.dir(['./uploads', './tmp']) //List all in all folders
local.file('./image.jpg') //get file
local.file(['./image.jpg', './photo.jpg']) //get files
local.findName('./uploads', /.jpg/) //returns all files with the extension .jpg ./uploads folder
local.findContent('./uploads', /.jpg/) //returns all files with the contents "hello" in ./uploads folder

About

Collection of libraries and shortcuts for local file handling and carrecados with express.js (multer)

Resources

Stars

Watchers

Forks

Packages

No packages published