Downloading PDFs using WAMS
Posted: Fri May 18, 2018 12:06 pm
I'm using a WAM to download A PDF to a browser
Webroutine Name(get_File) Response(#http1
#http1.ContentFile := #filepath
#http1.AttachmentFileName := #docnam
#http1.ContentType := #mimetype
In the browser this downloads the document. I'd like it to open in another tab for the user to view rather than to download then open it.
I gather this behaviour is controlled by the content-disposition tag eg
Content-Disposition: attachment; filename=HTTP_Succinctly.pdf
I think I need to set this to :inline but I cannot see a way to do this.
Can it be done in LANSA?
Webroutine Name(get_File) Response(#http1
#http1.ContentFile := #filepath
#http1.AttachmentFileName := #docnam
#http1.ContentType := #mimetype
In the browser this downloads the document. I'd like it to open in another tab for the user to view rather than to download then open it.
I gather this behaviour is controlled by the content-disposition tag eg
Content-Disposition: attachment; filename=HTTP_Succinctly.pdf
I think I need to set this to :inline but I cannot see a way to do this.
Can it be done in LANSA?