chjj / parted

Streaming body parser for node.js.
MIT License
63 stars 14 forks source link

Parted fails when using absolute Windows paths #10

Open mickmuzac opened 10 years ago

mickmuzac commented 10 years ago

If the upload path includes the drive letter, then the newest version of Parted seems to fail using Node 0.10.x on Windows 7.

I'm using Parted as an Express middleware with these options:

var options = {
    // custom file path
    path: 'c:\\temp',
    // memory usage limit per request
    limit: 30 * 1024,
    // disk usage limit per request
    diskLimit: 30 * 1024 * 1024,
    // enable streaming for json/qs
    stream: true
};

Note that it doesn't fail when options.path is set to \\temp or /temp.