"use strict";

function save(request, response){
	response.status(201).end();
}

function getById(request, response){
	response.end("<h1>Not Found</h1>");
}

module.exports.save = save;
module.exports.getById = getById;

"use strict";

var _ = require("lodash");
var path = require("path");

function save(request, response){

	var savedUrl = request.protocol + '://' + request.get('host') + "/file/" + request.files.file.name;
	response.status(201).end(savedUrl);
}

function getById(request, response){
	
	response.sendFile(request.params.id, { root: path.join(__dirname, '../uploads') });
}

module.exports.save = save;
module.exports.getById = getById;

Return url of asset on save. Implemented get by id functionality.
Return url of asset on save. Implemented get by id functionality.
