This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt) { | |
| // configure the tasks | |
| grunt.initConfig({ | |
| copy: { | |
| build: { | |
| cwd: 'source', | |
| src: [ '**', '!**/*.styl', '!**/*.coffee', '!**/*.jade' ], | |
| dest: 'build', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function (grunt) { | |
| 'use strict'; | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| sass: { | |
| build: { | |
| files: [{ | |
| expand: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
NewerOlder