Failed to Load PDF document when downloading using Presigned URL

Certified Lead Developer

We are trying to download documents from s3 inside the interfaces using getpresignedurlfors3 functions, we are able to download almost all other type of documents except we have identified that when we are trying to download pdf docs we are getting error- Failed to load PDF document.(PFA the screenshot).Fyi we are using chrome.
Please advise what should be the fix for the issue.
.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • +1
    Certified Lead Developer
    in reply to Harsha Sharma

    Yes It is Chrome browser not able to load the pdf, if the content-type is set to pdf while uploading the doc to s3, loading of doc fails in Chrome so the fix is to set the content-type= application/pdf while uploading.
    Also I hope Appian add 'responsecontentdisposition' parameter to getPreSignedURLForS3 function to force the download of the documents always instead of loading the document.
    Thanks