Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attaching a zip file by the use of AddHeader()
Message
De
17/05/2006 15:49:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
Attaching a zip file by the use of AddHeader()
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01122967
Message ID:
01122967
Vues:
74
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform