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:
00719127
Views:
35
This is a good solution. FTP is another IP Protocol (web pages use the HTTP protocol). All browsers can handle ftp downloads and automatically pop the download dialog.

It's not really hard to set an FTP site, but remember that some companies block the FTP port at the firewall/proxy. If it's the case of your client, you are back to the start...

BTW, my style of explaining has something to do with the fact that I dont know enough English words to use level of langage higher than what a 8 years old kid can understand (my home langage is French)<g>

HTH :-)



>Gerald,
>
>Thank you so much for your advise. Your style of explaining technical information is very refreshing. I think your last suggestion is a good way to go and until I come up with a better solution, I will follow it. In closing I would like to ask one last question. Some of the responders to my thread suggested that I set up an FTP snd point my pages to it for downloads. Any thoughts on this? Will this solve the browser cache/history problem?
>
>Neil
>
>>You can set a meta tag to prevent a page to be on the browser cache, but I dont think that was realated to the problem at hand because the problem was the .DOC and not the page with the link...
>>
>>For clearing the cache, that can not be done from the server. This is a security issue; you cannot perform manipulations on the client system.
>>
>>The solution to your problem was "education".
>>
>>Write it clearly:
>>
>>"To download the xyz.doc, right-click on the link and select 'Save target as...' from the popup menu..."
>>
>>Or: "Please print and fill this form and fax it to 222-3333, we will send you a floppy somewhere during the next 10 business days..." <g>
>>
>>HTH :-)
>>
>>
>>>Hi Gerald,
>>>Is there a meta tag attribute that will force a browser and history clear?
>>>
>>>
>>>Neil
>>>
>>>
>>>>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