I am creating a web application using django and backbone.js. The problem is I need to upload files to the server. How do I link the backbone model with a file? Thus when I execute model.save() the file is uploaded to the server.
EDIT: just to make things clear. What I want to do is I want to link a input file box with the backbone model. So when the user selects a file from his/her computer I should be able to link that file with the backbone model. And when I call the model.save() in the backbone script it should send the file along with rest of the model.