Re: [viewvc-users] Displaying file instead of downloading

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <4D422A9E.1010203__4244.98967263407$1296181933$gmane$org@collab.net>
On 01/26/2011 02:43 PM, Rick Gates wrote:
> Hi all,
> 
> I have recently configured viewvc-1.0.12 on my linux box.
> However, I am facing an issue, that whenever i browse my repository and
> click on the "download" link for a file ...
> it, instead of downloading the file, displays it on the web-browser itself.
> 
> Can any one please tell me if fixing this issue needs some kind of
> configuration change on my side?

There's a ... history here.  The short version is that ViewVC sort of treats
"download" more like "show it in the browser".  For most file types, that
results in the browser prompting you to save the file (or launch a
supporting app).  For file types that the browser natively supports, the
browser will of course just show the file.  This is by design, and enables
folks to serve up simple versioned websites directly from ViewVC.  But
occasionally there are times when a person wants "download" to mean
"download" all the time without exception.  Today there's no easy way to
provide that without hacking the ViewVC source code.

Well... hrm... now that I think about it, there *might* be a nasty
workaround way to do this.  You could create a custom mime.types file which
maps .html, .jpg, .gif, and so on to some non-browser-friendly mime type
such as "application/octet-stream".  Then tell ViewVC to consult that
mime.types file via the ViewVC configuration.  That might force ViewVC to do
what you want.  (Though, I confess I've not tried it myself.)

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2701103

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1CKp4ACgkQokEGqRcG/W6wpACgr7JY6e1/V3Qk1UgA+AHcVAAB
rT4An3rl1I4XpSATDdMlJnfzwc/dYhS3
=8ari
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.