Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Attaching a zip file by the use of AddHeader()
Message
From
17/05/2006 15:49:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Title:
Attaching a zip file by the use of AddHeader()
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01122967
Message ID:
01122967
Views:
70
Using the following West Wind code to attach a file by the use of AddHeader()
loHeader = CREATEOBJECT( "wwHTTPHeader")
loHeader.SetProtocol()
loHeader.SetContentType("application/zip")
loHeader.AddHeader("Content-Length",TRANSFORM( LEN( cInfo)))
loHeader.AddHeader("Content-Disposition", " :attachment ;filename=" + cFileName )
loHeader.AddHeader("Accept-Ranges","bytes")
loHeader.AddHeader("Connection","Close")
Response.Rewind()
Response.ContentTypeHeader(loHeader)
Response.Write( cInfo)
Would there be any time processing factor if the attach file is about 400 Meg? I see this approach allows us to attach a file which is not among the IIS directory structure. Thus, we can send a zip file to the browser even if the file is not sitting in the IIS structure. If the time processing factor to create that header is not a factor then this approach could be used to avoid storing secure file in the IIS structure.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform