Tips and Tricks

Adding Files When Creating a Job

The file should be added to the body of the request as a binary attachment. Please make sure you have correctly inserted the Memsource and the Content-Disposition headers. Below you can find the sample PHP from Postman.


$request = new HttpRequest();

'token' => 'Your token goes here'

'postman-token' => 'ABC',
'cache-control' => 'no-cache',
'content-disposition' => 'filename*=UTF-8''Sample.txt',
'memsource' => '{\\"targetLangs\\":[\\"de\\",\\"fr\\",\\"es\\"],\\"callbackUrl\\":\\"\\",\\"importSettings\\":{\\"uid\\":\\"WF0T1SfSHxII09yKr0dZh9\\"}}'

try {
$response = $request->send();

echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;

Was this article helpful?



Please sign in to leave a comment.