Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ported to Windows, check Directory Temp #7

Closed
wants to merge 1 commit into from

2 participants

Fabrício Dias Christopher Jeffrey
Fabrício Dias

No description provided.

Christopher Jeffrey
Owner

Is there a difference between process.platform and os.platform?

I already tried to account for windows in other places, but I had no idea where the equivalent of /tmp is on windows.

Christopher Jeffrey chjj closed this pull request from a commit
Christopher Jeffrey use random string instead of timestamp for unique filenames. account …
…for windows more, closes #7.
7a7e634
Christopher Jeffrey chjj closed this in 7a7e634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 30, 2012
Fabrício Dias fmgdias Ported to Windows, check Directory Temp 7196ee8
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +6 1 lib/multipart.js
7 lib/multipart.js
@@ -5,6 +5,7 @@
5 5 */
6 6
7 7 var fs = require('fs')
  8 + , os = require('os')
8 9 , path = require('path')
9 10 , EventEmitter = require('events').EventEmitter
10 11 , StringDecoder = require('string_decoder').StringDecoder
@@ -364,7 +365,11 @@ Parser.prototype._finish = function() {
364 365 * Uploads
365 366 */
366 367
367   -Parser.root = '/tmp';
  368 +if ( os.platform() == "win32" || os.platform() == "win64" ) {
  369 + Parser.root = 'c:/Temp';
  370 +} else {
  371 + Parser.root = '/tmp';
  372 +}
368 373
369 374 /**
370 375 * Middleware

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.