Skip to content

Node.js based forum software built for the modern web

removed old upload code

Baris Usaklic76eeaba3ee2
diff --git a/src/routes/user.js b/src/routes/user.js
index 78fbf6b030..5902b10dc3 100644
--- a/src/routes/user.js
+++ b/src/routes/user.js
@@ -138,8 +138,6 @@ var user = require('./../user.js'),
var is = fs.createReadStream(tempPath);
var os = fs.createWriteStream(global.configuration['ROOT_DIRECTORY'] + uploadPath);
-
- is.pipe(os);
is.on('end', function(){
fs.unlinkSync(tempPath);
@@ -159,36 +157,7 @@ var user = require('./../user.js'),
console.log(err);
});
-
-
- /*util.pump(is, os, function() {
- fs.unlinkSync('source_file');
- });*/
-
-
- /*fs.rename(
- tempPath,
- global.configuration['ROOT_DIRECTORY'] + uploadPath,
- function(error) {
- if(error) {
- console.log(error);
- res.send({
- error: 'Error uploading file!'
- });
- return;
- }
-
- var imageUrl = config.upload_url + filename;
-
- res.send({
- path: imageUrl
- });
-
- user.setUserField(uid, 'uploadedpicture', imageUrl);
- user.setUserField(uid, 'picture', imageUrl);
-
- }
- );*/
+ is.pipe(os);
}