public function uploadFile($realPath, $file_name, $file_type, UploadFileParameters $params = null)
    {
        if (is_null($params)) {
            $params = new UploadFileParameters();
        }
        $params = $params->exportToArray();
        $params['file'] = $realPath;
        $params['fileUri'] = $file_name;
        $params['fileType'] = $file_type;

        $requestData = $this->getDefaultRequestData('multipart', $params);

        return $this->sendRequest('file', $requestData, self::HTTP_METHOD_POST);
    }
public function uploadFile($realPath, $file_name, $file_type, UploadFileParameters $params = null)
    {
        if (is_null($params)) {
            $params = new UploadFileParameters();
        }
        $params = $params->exportToArray();
        $params['file'] = $realPath;
        $params['fileUri'] = $file_name;
        $params['fileType'] = $file_type;

        $requestData = $this->getDefaultRequestData('multipart', $params);

        return $this->sendRequest('file', $requestData, self::HTTP_METHOD_POST);
    }
public function uploadFile ( $ realPath , $ file_name , $ file_type , UploadFileParameters $ params = null ) { if ( is_null ( $ params ) ) { $ params = new UploadFileParameters ( ) ; } $ params = $ params -> exportToArray ( ) ; $ params [ 'file' ] = $ realPath ; $ params [ 'fileUri' ] = $ file_name ; $ params [ 'fileType' ] = $ file_type ; $ requestData = $ this -> getDefaultRequestData ( 'multipart' , $ params ) ; return $ this -> sendRequest ( 'file' , $ requestData , self :: HTTP_METHOD_POST ) ; }
Uploads original source content to Smartling.

@param string $realPath
Real path to the file to read in into stream.
@param string $file_name
Value that uniquely identifies the uploaded file. This ID can be used to
request the file back.
@param string $file_type
Unique identifier for the file type. Permitted values: android, ios,
gettext, html, javaProperties, yaml, xliff, xml, json, docx, pptx, xlsx,
idml, qt, resx, plaintext, cvs, stringsdict.
@param UploadFileParameters $params
(optional) An associative array of additional options, with the following
elements:
- 'approved': Determines whether content in the file is authorized
(available for translation) upon submitting the file via the Smartling
Dashboard.
- 'localesToApprove': This value, if set, authorizes strings for
translation into specific locales.

@return array
Data about uploaded file.

@throws \Smartling\Exceptions\SmartlingApiException

@see http://docs.smartling.com/pages/API/FileAPI/Upload-File/
Uploads original source content to Smartling .