public function updateFileResource(File $resource, $binaryData)
    {
        $url = self::makeUrl(null, $resource->uri);

        $body = $binaryData;
        $response = $this->service->sendBinary($url, array(201, 200), $body, MimeMapper::mapType($resource->type), 'attachment; filename=' . $resource->label, $resource->description, 'PUT');
        return File::createFromJSON(json_decode($response, true), get_class($resource));

    }