NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Richard I on May 14, 2021, 08:54:54 PM

Title: File Download example 40 query
Post by: Richard I on May 14, 2021, 08:54:54 PM
Hello,
I have Incorporated the File Download 40 example into a netTalk app
I have two tabs on the form ,  one for the downloading of a text file and the other for a pdf file.

Both work

My query is that the CSV download  brings the file in unopened whereas the TXT import opens the text file in the browser
I dont seem to be able to find a reason why the TXT file is being opened.

Is there a setting?

Thanks
Cheers
Richard NT 12.17


Title: Re: File Download example 40 query
Post by: Bruce on May 16, 2021, 11:28:00 PM
Hi Richard,

Yes, note this line in the ServeDocument procedure;

  p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&p_web.GetValue('name')&'"'

as distinct from

  p_web.HeaderDetails.ContentDisposition = 'inline; filename="'&p_web.GetValue('name')&'"'   

Cheers
Bruce
Title: Re: File Download example 40 query
Post by: Richard I on May 18, 2021, 12:41:20 AM
Thanks Bruce
regards,
Richard