Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using the Adobe PDF Services API and trying to do a PUT via tRestClient and need to include a pdf file in the body but nothing I've tried so far has worked. Below is the REST API CURL found in the documentation. How do I achieve the inclusion of the PDF file which is referenced in the --data-binary '@{{Placeholder for file path}}'?
https://developer.adobe.com/document-services/docs/overview/pdf-services-api/gettingstarted/
curl --location -g --request PUT 'https://dcplatformstorageservice-prod-us-east-1.s3-accelerate.amazonaws.com/b37fd583-1ab6-4f49-99ef-...{Placeholder for X-Amz-Security-Token}}&X-Amz-Algorithm={{Placeholder for X-Amz-Algorithm}}&X-Amz-Date={{Placeholder for X-Amz-Date}}&X-Amz-SignedHeaders={{Placeholder for X-Amz-SignedHeaders}}&X-Amz-Expires={{Placeholder for X-Amz-Expires}}&X-Amz-Credential={{Placeholder for X-Amz-Credential}}&X-Amz-Signature={{Placeholder for X-Amz-Signature}}' \
--header 'Content-Type: application/pdf' \
--data-binary '@{{Placeholder for file path}}'
Hello Dobby1,
Thank you for reaching out to the Qlik community.
In the Adobe PDF Services flow, PUT is a plain binary upload to a pre‑signed S3 URL. In tRestClient, you must send the PDF as raw binary bytes in the request body, not as multipart/form‑data.
You can refer to this article, which gives detailed information about the same.
Hi,
Thank you. I have tried the tHTTPClient but still no success. I looked as it the component was changing "&" to "&" in the URL so I applied java.net.URLEncoder.encode() to the path. The error I'm receiving now is:
<Error><Code>KeyTooLongError</Code><Message>Your key is too long</Message><Size>1830</Size><MaxSizeAllowed>1024</MaxSizeAllowed>
I don't know what key it is referring to or how to fix it.
Why are you getting KeyTooLongError:
What not to do:
What to do instead:
Talend (tHttpRequest / tRestClient):
That’s it.
If you still get errors, check that the outgoing request URL shows &X-Amz-... (not %26X-Amz-...).
Hi Rahul,
I tried the options you suggested but it appears that the tHTTPClient is changing the URL that is being sent. I observed that the response body had "&" replaced with "&". That caused an error message indicating that the SignatureProvided does not match no longer appears.
I have a case opened with Qlik.