Skip to content

Instantly share code, notes, and snippets.

View t2k's full-sized avatar
🎯
Focusing

Ted T. Killilea t2k

🎯
Focusing
View GitHub Profile
var uploader = function(req, res) {
var cntProcessing=0;
var busboy = new Busboy({ headers: req.headers });
busboy.on('file', function(fieldname, stream, filename, encoding, contentType) {
var pStream = pauseStream(); // use pause stream to have time to open the GridStore
stream.pipe(pStream.pause());
console.log('POST ' + req.originalUrl + ' File: '+ filename + ' Field: ' + fieldname);
module.exports = function (grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
build: {
files: [{
expand: true,
var BusBoy = require('busboy'),
fs = require('fs'),
path = require('path');
var RE_MIME = /^(?:multipart\/.+)|(?:application\/x-www-form-urlencoded)$/i;
// options will have limit and uploadDir.
exports = module.exports = function(options){
return function multipart(req, res, next) {
module.exports = function(grunt) {
// configure the tasks
grunt.initConfig({
copy: {
build: {
cwd: 'source',
src: [ '**', '!**/*.styl', '!**/*.coffee', '!**/*.jade' ],
dest: 'build',