diff --git a/.gitignore b/.gitignore index 9ef67c4..69b7fa1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -upload/* +public/upload/* diff --git a/plemp.js b/plemp.js index 256363b..0d0dafa 100644 --- a/plemp.js +++ b/plemp.js @@ -14,11 +14,11 @@ var express = require("express"), // Set up the Node Express application. var app = express.createServer(form({ keepExtensions: true, - uploadDir: __dirname + '/upload' })); + uploadDir: __dirname + '/public/upload' })); var draggables = {}; // Initialise the draggables info. -fs.readdir(__dirname + '/upload', function (err, files) { +fs.readdir(__dirname + '/public/upload', function (err, files) { if (err) throw(err) for (var i in files) { @@ -46,7 +46,7 @@ app.get('/', function(req, res) { // The draggable route: provides direct access to the HTML generating code // for draggable objects. app.get('/draggable/:id', function(req, res) { - var file = "upload/" + req.params.id; + var file = "public/upload/" + req.params.id; // Stuff taken from the Camping implementation. drag = draggables[req.params.id]; var default_style = "left:" + drag.left + "px;top:" + drag.top + "px;"; diff --git a/public/upload b/public/upload deleted file mode 120000 index 1e7a8be..0000000 --- a/public/upload +++ /dev/null @@ -1 +0,0 @@ -../upload \ No newline at end of file diff --git a/upload/.placeholder b/public/upload/.placeholder similarity index 100% rename from upload/.placeholder rename to public/upload/.placeholder