public function ContextApi::uploadResource in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::uploadResource()
- 8.2 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::uploadResource()
- 8.3 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::uploadResource()
Upload resource.
Parameters
$resourceId:
\Smartling\Context\Params\UploadResourceParameters $params:
Return value
bool
Throws
File
- vendor/
smartling/ api-sdk-php/ src/ Context/ ContextApi.php, line 266
Class
- ContextApi
- Class ContextApi
Namespace
Smartling\ContextCode
public function uploadResource($resourceId, UploadResourceParameters $params) {
$endpoint = vsprintf('resources/%s', $resourceId);
$requestData = $this
->getDefaultRequestData('multipart', $params
->exportToArray());
return $this
->sendRequest($endpoint, $requestData, self::HTTP_METHOD_PUT);
}