Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
it's not how you link a file, it's how the browser on the other end is set to handle it. For instance, Safari knows that files ending in ".dmg" aren't viewable in a Safari window, so it downloads it instead. Most browsers have a control panel that lets you change settings for various file extensions and MIME types.

pnw
 
Yes, I realize that, but I'm thinking here of a special page for downloads, such as the "file sharing" pages on .Mac where you can access members' iDisk public folders. On those pages you can just click a little "download" arrow and the file starts downloading right away.

I'd love to have people on my website just click an icon and have the file download automatically - and I'd rather not have to teach them how to configure their browsers or right-click &c. Is there any way?
 
Not sure if there is a way to do that in HTML, but I think you can configure your webserver (Apache in Mac OS X, etc.) to not recognize file types, which would make the browser download the file by default. I'm not sure if this would work, though...

You need to have access to your webserver config to do this.
 
Originally posted by shakespeare
Thanks for the help - does anyone have any idea how the File Sharing pages on .Mac pull this off?

read the page source...? if it isn't obvious then it must be serverside.
 
Mm, I did read the page source - on a Mac, the page links to a .sit file, which automatically downloads (rather than opens in the browser); and on Windows, it links to a mysteriously named file 'shakespeare.pdf-link.pdf' or 'shakespeare.html-link.html' &c. The part before the hyphen is the real filename, and what follows, just a 'link'.

So yes, I suppose, that must be serverside. Damn, I guess I'll have to wait a while before I figure it out.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.