Overriding data adapter for a specific type


#1

I’m looking to use ember data to upload files using FormData (I need to support file uploads and only have to target Chrome), however I only need this functionality for select models. Is there an easy to way to overwrite the RestAdapter for individual types, or is it an all or nothing kind of thing?


Defining an API endpoint on a model-by-model basis
#2

You can register adapters on a per model basis, so you could have your custom adapter on a few models, and the rest could be the default RESTAdapter. Looks something like this:

App.Store.registerAdapter("App.MyModel", App.customRestAdapter);