Hi,
I've created an Integration component and I have a PDF to send to a remote REST API (by POST method).
So I've created an Appian document, and I've upload a PDF file (Test1.pdf) as it.
When I call the remote API, I get an error in the response : "developerMessage : Extension non authorized - filename: "Test1.pdf.zip" "
Do you know why this component is adding ".zip" extension to the PDF file ?
Of course, I've tested it before in Postman and all works fine.
In my request body (in Appian), I've set my param like this :
Name : "document"
Content Type : Document (auto-detect)
Value : (RI is uploaded with Test1.pdf)
I've tried another way : Content Type = Custom (with application/pdf) but I obtain another error : "Internal error: Required request part 'document' is not present"
Any idea ?
Discussion posts and replies are publicly visible
Did you check the outgoing headers in the HTTP request? Do they include any hint on the ZIP document type or file name?
I've just saw the encoding field (gzip), but not any Zip document type for the requested param :
POST /my-ws/rest/v1/documents/upload HTTP/1.1Content-Type: multipart/form-data; boundary=TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9Content-Length: 36084Host: my-host.frConnection: Keep-AliveUser-Agent: AppianAccept-Encoding: gzip,deflate
--TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9Content-Disposition: form-data; name="document"; filename="Test1.pdf"Content-Type: application/pdfContent-Transfer-Encoding: binary
Binary content not shown for document, Test1.pdf (33.94 KB).
--TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9Content-Disposition: form-data; name="comment"Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bittest 1
--TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9Content-Disposition: form-data; name="label"Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitSAS1
--TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9Content-Disposition: form-data; name="meta"; filename="Test1.xml"Content-Type: application/xmlContent-Transfer-Encoding: binary
Binary content not shown for document, Test1.xml (< 1 KB).
--TnQmfygKfP801A_kE1bGL-7YAFk_k6gl9--
This looks good to me. I am not sure about the PDF format. I assume this also uses some kind of compression. If this other system now checks the binary content for a ZIP signature, this might lead to issues. But this is just guessing !?!
Thank you Stefan, but in this case why I don't have the same issue in Postman ?
True ... is there some other system in between? I mean, a request from Appian goes a different route than from your local machine using Postman.
Stefan, I could obtain the solution : the remote API has a bug : the error message sent was inappropriate, they are going to change it.Here I am reassured