Error Invalid data type, must be an array or \\ArrayAccess instance

When I send a image and text data, have the next problem, this happend when I send data from angular to cakephp 3 with rest service and don’t know how solve:

Possibly unhandled rejection: {
      "message":"Invalid data type, must be an array or \\ArrayAccess instance.",
      "Accept, Authorization, Cache-Control, Content-Type, X-Requested-With, x-csrf-token",
    "statusText":"Internal Server Error"}

Now in angular have my service for send this information:

.service('fileUpload', ['$http', function ($http) {
        this.uploadFileToUrl = function(file, uploadUrl){
            var formData = new FormData();
            // here take the values
            formData.append('descripcion', file.descripcion);
            //show values formData
            for (var key of formData.entries()) {
                console.log(key[0] + ', ' + key[1]);
            //post url uploadUrl = '/app/documents/add'
            $, formData, {
                transformRequest: angular.identity,
                headers: {
                    'Access-Control-Allow-Origin' : '*',
                    'Access-Control-Allow-Headers': 'Accept, Authorization, Cache-Control, Content-Type, X-Requested-With, x-csrf-token',
                    'Content-Type': undefined

This is the controller on my backend:

public function add()
        $document = $this->Documents->newEntity();
        $data = ['result' => 'null', 'id' => 'null'];
        if ($this->request->is('post'))
            $document = $this->Documents->patchEntity($document, $this->request->getData());
            if ($this->Documents->save($document))
                $data = ['result' => 'success', 'id' => $document->id];
            } else {
                $data = ['result' => 'error'];
        $this->set('_serialize', ['data']);