Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Download a file tag
Message
 
À
24/05/2002 09:10:37
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00660743
Message ID:
00661002
Vues:
25
>>>
>>>
>>>***This brings up the save as dialog.
>>><a href='/temp/myexe.exe'>Click here to download</a>
>>>
>>>***This displays the image.
>>><a href='/temp/myimage.jpg'>Click here to download</a>
>>>
>>>
>>>Thanks,
>>>
>>>Jerryt
>>
>>Create a folder to your downloads and set a custom httpheader for this folder in IIS.
>>Set it to: ContentDisposition=attachment
>>
>>That should work with nearly all browsers :-)
>
>
>Thanks for the help. I am using W2K Advanced server and IIS5. I tried what you suggested by going to the folder and it's properties. Then I went to HTTP Headers tab and clicked on ADD under the Custom HTTP Headers section.
>
>In this dialog, I entered: ContentDisposition as the custom header name and: attachment as the custom header value.
>
>I then stoped and restarted IIS and tried the above hyperlinks but the image displayed and did not download. I am trying to create a hyperlink to initiate a download of any file type.
>
>Is this the process you meant?
>
>Thanks,
>
>Jerryt

Yes, and that work for pdf, exe, zip ...
I suppose that the jpg and gif files mime-type was too hard coded to be downloaded this way.
Sorry :-(

You can zip the files.

You can also instruct the users to right-click download the file
You can enforce this by putting: onclick="return false;" in the A tag.
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