@ampatspell/ember-cli-relax-adapter
v0.0.12
Published
ember-cli addon for `@ampatspell/relax` JSON API server
Downloads
28
Maintainers
Readme
ember-cli-relax-adapter
ember-cli addon for @ampatspell/relax
JSON API.
Extends DS.JSONAPIAdapter, adds file upload support and rev
parameter for model deletes.
File uploads
import DS from "ember-data";
export default DS.Model.extend({
files: DS.attr('raw'),
// arr: File objects
addFiles: function(arr) {
var files = this.get('files');
if(!files) {
files = [];
this.set('files', files);
}
files.pushObjects(arr);
}
});