When you are building a Backbone application you will consume resources from a RESTful web service; however most of the RESTful services use the JSON format to encode information, but JSON is not suitable to send and receive files. How we can send files to a RESTful server?
But web applications need to work with files. There are some approaches to deal with this common issue. For example, you could use a traditional POST form on resources where files may be included; however, that's not a good option. In this chapter you will learn the following:
Handle file uploads from an Express server
Adopt strategies to send files to a RESTful server