src/Jaspersoft/Service/RepositoryService.php
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));

    }
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));

    }
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 ) ) ; }
Update a file on the server by supplying binary data

@param \Jaspersoft\Dto\Resource\File $resource A resource descriptor for the File
@param string $binaryData The binary data of the file to update
@return \Jaspersoft\Dto\Resource\Resource
Update a file on the server by supplying binary data