NetTalk Central

Author Topic: File Download example 40 query  (Read 3119 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
File Download example 40 query
« 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



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: File Download example 40 query
« Reply #1 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
« Last Edit: May 18, 2021, 09:23:59 PM by Bruce »

Richard I

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
    • Email
Re: File Download example 40 query
« Reply #2 on: May 18, 2021, 12:41:20 AM »
Thanks Bruce
regards,
Richard