So I have an app that can post images etc within its own structure. I can post my backbone models(JSON data) to a live mongodb server with mongoose, something like this mongoose.connect(configDB.url);
and all my messages in the app even from localhost are sent to a live server.
I am not sure how I can post images/files to a live server? I am using node.js with express as a server and also using these handy plugins https://github.com/blueimp/jQuery-File-Upload with the middleware https://github.com/aguidrevitch/jquery-file-upload-middleware.
I can post images to the local site directory like this
upload.configure({
uploadDir: __dirname + '/public/img',
uploadUrl: '/img',
imageVersions: {
thumbnail: {
width: 80,
height: 80
}
}
});
That is cool when my app is live, but I have several computers in the office running node locally and want to test the file upload, I just need the images to be hosted, similarly to what amazonS3 can do.
I hope I can learn something here. Thanks everyone who takes the time!