Skip to content
Myr

Misc styling for sample app

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 4d926d3 · Browse files · 3 files+36 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+36 added−5 removed

  • other:+36 added−5 removed

3 files+36 added−5 removed

modified:examples/upload/views/style.sass.css+5 added
modified:examples/upload/views/upload.haml.html+6 added-2 removed
modified:lib/express/core.js+25 added-3 removed
9 unmodified lines
10process.mixin(require('express/plugin'))11process.mixin(require('express/mime'))12process.mixin(require('express/dsl'))1314var multipart = require('multipart')1516// --- Route1718Route = Class({19
194 unmodified lines
214 if (backlog !== undefined) this.backlog = backlog215 require('http')216 .createServer(function(request, response){217 request.body = ''216 request.setBodyEncoding('utf8')217 request.addListener('body', function(chunk){ request.body += chunk })218 request.addListener('complete', function(){ self.route(request, response) })218 request.setBodyEncoding('binary')219 if (request.headers['content-type'] &&220 request.headers['content-type'].indexOf('application/x-www-form-urlencoded') > -1) {221 // var stream = new multipart.Stream(request)222 // stream.addListener('part', function(part) {223 // part.addListener('body', function(chunk) {224 // var progress = (stream.bytesReceived / stream.bytesTotal * 100).toFixed(2);225 // var mb = (stream.bytesTotal / 1024 / 1024).toFixed(1);226 // 227 // sys.print("Uploading "+mb+"mb ("+progress+"%)\015");228 // 229 // // chunk could be appended to a file if the uploaded file needs to be saved230 // });231 // });232 // stream.addListener('complete', function() {233 // res.sendHeader(200, {'Content-Type': 'text/plain'});234 // res.sendBody('Thanks for playing!');235 // res.finish();236 // sys.puts("\n=> Done");237 // });238 } else239 request.addListener('body', function(chunk){ request.body += chunk }),240 request.addListener('complete', function(){ self.route(request, response) })241 })242 .listen(this.port, this.host, this.backlog)243 puts('Express started at http://' + this.host + ':' + this.port + '/ in ' + Express.environment + ' mode')244 },
62 unmodified lines