So far we've been using Backbone in JavaScript along with a Java Servlet to sync data between our client and our server. We use Jackson to turn the JSON into a Java Object serverside.
Our model is a profile object that contains basic information about the user such as name, email, etc. and now we want to add a profile picture to that object.
We've experimented with FileReader--uploaded the image on the client and then converted it to Base64. This works well for uploading with JSON. But We have now learned that FileReader is not fully supported (specifically on older versions of IE and Safari, as well as some mobile browsers).
We have thought about doing a form multi-part upload, but then we would have to break backbone since we would no longer be sending json during a save. It's also not clear if we could automatically parse our data into into a JavaObject using Jackson, or if we would have to do it ourselves. File upload seems fairly straight-forward, but automatic marshaling does not.
Surely someone has run into this problem before?