Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Downloading WORD files to save not to view
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00717723
Message ID:
00718289
Vues:
26
All is set in IIS.

simple site structure:
RootHTMLDir\
   .\Download\
In IIS select the "download" folder and in the prop page of this folder select the HTTP Headers page. Click Add to add the custom header (Content-Disposition:Attachment). And click OK to apply the change.

Every files in the "download" directory will prompt for download in IE.

So, your html page with the link should not reside in the download folder, only your DOC. The html page will be in the RootHTMLDir...

HTH :-)



>Now this sounds very interesting. Is the custom header set through IIS. If so, how do I get to it. And.. How do I do it? Are you saying that once the custom header is set, any file hit via a link will generate the client's DL dialog. Or... Does the link have to hit an ASP residing in the download folder.
>
>Regards,
>
>Neil
>
>>In IIS you just have to create a "download" folder and place the .doc in it.
>>You have to set a custom header to this folder as follow:
>>
>>Content-Disposition:Attachment
>>
>>With this setting in place, any links that point to files in this folder should display the download dialog in IE.
>>
>>HTH :-)
>>
>>
>>>Hi Thomas,
>>>
>>>Thank you for getting invlolved. Now this is very interesting. But how does this come into play with a link that I place on a web page? ie:
>>>
>>>
>>>  <a href="MyWordDocument.doc">Download My WORD Document<a>
>>>
>>>
>>>Neil
>>>
>>>>Hi Neil,
>>>>
>>>>it is a Windows API function:
>>>>
>>>>DECLARE LONG URLDownloadToFile IN URLMON.DLL ;
>>>> LONG, STRING, STRING, LONG, LONG
>>>>lnResults = URLDownloadToFile(0, lcURL, lcFileName, 0, 0)
>>>>
>>>>HTH
>>>>
>>>>thomas
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform