NetTalk Central

Author Topic: Download a non PDF File from The Server TO Client To Save  (Read 4092 times)

zdpl0a

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Download a non PDF File from The Server TO Client To Save
« on: January 03, 2008, 10:17:01 AM »
Hi All,

I have a question that I should be able to figure out... duh...

My customer access site runs great.  My customers can launch reports as PDF's, and they can pull their monthly stastements and invoices out of their PDF folders (with a little security coded in ...)

I have scanned images stored as TIF files.  The customers do not need to view these over the web.  They just need to clik on a link in the
orders browse.  The field asscoiated with the button has the compelte path and file name of the TIF file, just like I do with their statements.

I need to launch a save at the client and and server them the tif file.  I keep getting 'junk' or the infamous 404. If I'm close, my template setting are wrong.

I'm wondering if I need to add and NetTalk FTP Download?

I do have a WebNetPage to serve a test PDF so I know I am close. 

Any Help!  would be greatly appreciated?


Dave




Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Download a non PDF File from The Server TO Client To Save
« Reply #1 on: January 03, 2008, 12:38:00 PM »
The field asscoiated with the button has the compelte path and file name of the TIF file...

dave,

where is that path? Below \web?

It will not work if its outside that \web\-Folder.

Wolfgang

zdpl0a

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Re: Download a non PDF File from The Server TO Client To Save
« Reply #2 on: January 03, 2008, 12:51:35 PM »
Wolfgang,

It is below the web folder structure.    I have a static file there now for testing.  I have a PDF file there too that I can change settings and serve up to the brwoser.

I'm not sure how to set the template from the browse, and on the web net page template to grab the TIF and pass it through.

The type is not a PDF,XML or HTML so I assume it should be other.  There are other settings I guess I need to set correctly.   Not sure.

When I lauch my file fetch web net page I also get an error 400, dependign on how I play with the setting.... it does not like the type of TIF.

Thanks for any help.

Dave



Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Download a non PDF File from The Server TO Client To Save
« Reply #3 on: January 03, 2008, 01:06:11 PM »
Dave,

TIF is a format a webbrowser usually can't display. That means it gets offered to be stored, just like a ZIP-file or anything else "un-displayable".

If its below \web then is has to work. Do you construct the path on your own? Check if you have slashes and no backslashes! Backslash is Microsoft, not Internet ;-)

Did you try a right mouse-click, "Save File As..."?

bye
Wolfgang

zdpl0a

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Re: Download a non PDF File from The Server TO Client To Save
« Reply #4 on: January 04, 2008, 08:38:59 AM »
HTTP/1.0 400 Bad Request Date: Fri, 04 Jan 2008 16:27:22 GMT Server: NetTalk-WebServer/4.23 Beta Content-Length: 444 Content-Type: text/html Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link href="styles/error.css" rel="stylesheet" type="text/css" /><title>400 Bad Request</title></head> <body class="ErrorPage"> <hr></hr> <h1>Bad Request</h1> The requested file was not valid <br><br><hr></hr> </body> </html>

Wolfgang,

I get the above with the following setup.....

The borwse column has the path/ filename of the TIF. It is \I111034.TIF  . I also tried it without the slash. I hard coded one entry/file name during the startup of the application and the table is a memory table, refereshed every 15 minutes. All the rows refer to the same document.

The physical file is in every folder underneath the WebCustomer01 root folder I am working within. I am testing locally.


The web browse column is setup in the template as:

Type:String

Field: XTP:ArchiveTitlePath

Description:Downlload
Display:'Download'
Picture '@s127'
Header:'Download'
Header Tooltip: 'Download Docs'

Column CSS Class: Custom


Hyperlink Tab:

URL: 'DWNOrderFilePage?newdocname = ' & XTP:ArchiveTitlePath

TargetFrame: '_blank'

The NetWebPage template is setup as:

Page Name: DWNOrderFilePage.pdf

Page Type: PDF

PDF  loc:filename



I store the actual  path\filename from the table, in a session variable docname using the Start of SendPacket embed

In the NetWebPage routine I load loc:filename from the session variable in the  Processed Code Embed.

This all work well when the file is a PDF.  I provide online access to for PDF statements to my customers this way.


Thanks,

Dave