Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

specify file name of the document returned on the HTTP post

Avatar

Former Community Member

Hello,

we are submitting a PDF form by calling submitForm function:

doc.submitForm
(
    {
        cURL: "http://localhost/script",
        cSubmitAs: "XML"
    }
);

The server returnes data of type "Content-type: application/pdf" and as a result this aplication/pdf data is displayed in a new window in Acrobat Reader.

The document in new window has name e.g. A9R3347.tmp, is it possible to force some concrete name ?

We tried to send from server the http header:

Content-Disposition: attachment; filename=\"custom_name.pdf\"

or   

Content-Type: application/pdf;         filename=custom_name.pdf

but non of this works.

1/ is it possible to set some custom name of the document, which is returned from a server in response of HTTP Post submit ?

2/ is it possible to return other kind of data then application/pdf ? ( my tests with AR 9.3 with other formats failed).

Thanks for any advice.

0 Replies