Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Still doesn't work on windows for 'show image right after uploading' #24

Closed
heaventear opened this Issue Nov 11, 2012 · 1 comment

Comments

Projects
None yet
3 participants

The latest zipped code doesn't work on windows for file renaming. So I resort to file copying instead.

Dig in for a while. Come up with one solution. See below.

In the upload request handler, use code below for file copying.

fs.createReadStream(files.upload.path).
pipe(fs.createWriteStream('/tmp/test.jpg').
on('close', function(){
response.writeHead(200, {"Content-Type": "text/html"});
response.write("received image:
");
response.write("");
response.end();
}));

blessenm commented May 5, 2013

The above code worked for me on windows. But still needed to specify the paths with ./ instead of /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment