You are here

public function FileApi::deleteFile in TMGMT Translator Smartling 8.2

Same name in this branch
  1. 8.2 api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::deleteFile()
  2. 8.2 vendor/smartling/api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::deleteFile()
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::deleteFile()
  2. 8.3 vendor/smartling/api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::deleteFile()

Removes the file from Smartling.

The file will no longer be available for download. Any complete translations for the file remain available for use within the system. Smartling deletes files asynchronously and it typically takes a few minutes to complete. While deleting a file, you can not upload a file with the same fileUri.

Parameters

string $fileUri:

ParameterInterface $params:

Return value

array

Throws

SmartlingApiException

File

api-sdk-php/src/File/FileApi.php, line 345

Class

FileApi
Class FileApi

Namespace

Smartling\File

Code

public function deleteFile($fileUri, ParameterInterface $params = null) {
  $params = is_null($params) ? [] : $params
    ->exportToArray();
  $params['fileUri'] = $fileUri;
  $requestData = $this
    ->getDefaultRequestData('form_params', $params);
  return $this
    ->sendRequest('file/delete', $requestData, self::HTTP_METHOD_POST);
}