Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloading WORD files to save not to view
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00717723
Message ID:
00718758
Views:
26
This is a client side issue.
Clear the browser cache and history.

Now, retry the links, the download or open dialog will pop every time you click on the link.
But, if you choose open for one of the link, the next time you click this link, the file will open in the browser directly without DL dialog.

I dont know other properties to set in IIS that force DL for this particular issue.

The alternative was to set an ftp site...

:-)


>Gerald,
>
>I fired up the IIS management console. I expanded the tree and highlighted the folder DOWNLOAD. I right clicked on DOWNLOAD and selected properties from the menu. I selected the tab: HTTP Headers. I hit the ADD button. Then I entered the following:
>Custom Header Name --> Content-Disposition
>Custom Header Value -->Attachment
>
>There are 2 .doc files in the download folder. When I hit a link on a web page that looks for the first .doc file, the DL dialog pops up. That is great. However, the second .doc file still opens up in the client's browser. What do you think is happening here? I made certain that the properties for the folder are set as per your instructions. If I remove the custom header, both .doc files open in the client's browser rather than downloading. When I put back the custon header, only one of the 2 .doc files cause the client's DL dialog to activate. Remember that the .doc files are simple word files.
>
>Thanx again
>Neil
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform