How can I add link for getting latest version of a file?

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

How can I add link for getting latest version of a file?

Post by davenovak » Tue Apr 10, 2007 3:22 pm

On our internal Wiki, I would like to be able to reference some documents that I've checked into Vault. Assuming I don't mind being locked into a particular version of the doc, the web interface link is simply:

Code: Select all

http:<VaultServer>/VaultService/VaultWeb/GetFile.aspx?repid=<rid>&path=<path>&version=<version>
But I do mind -- I would like to have Vault always return the latest version. From my experimentation, however, you have to put in a valid version.

Any way around this to get it to pull the latest version?

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Tue Apr 10, 2007 11:18 pm

I think version=-1 will do the trick.

Bye,
Kasti.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Wed Apr 11, 2007 6:38 am

Perfect -- that works! (I only tried Version=0 and no version tag.) Thanks a bunch!

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Wed Apr 11, 2007 8:43 am

Let me ask this: is there a way to support anonymous access to GetFile.aspx? This way, users aren't prompted to login before they get the file. This is all intranet only, so I have no real security concerns.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Mon Apr 16, 2007 8:12 pm

In other words, is there a way to pull a file from Vault, using an http link, wherein I do not get prompted for credential?

Possibilities here include:
  • 1. Anonymous access
    2. Supply Username / Password as params to http call
Does either way exist? This would be very helpful as I now like to put links to files (currently under Vault) into our Wiki. I prefer the hyperlink open the file directly rather than prompt me for credentials.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Thu Apr 26, 2007 12:08 pm

Does ANYONE have an answer for this?!?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Apr 26, 2007 12:20 pm

All the Vault client products will require authentication of some type. There's nothing in the Built In products which can do this.

About the only alternative is to write your own tool based on the Vault Client API that stores and automatically presents authentication to the server.
Jeff Clausius
SourceGear

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Thu Apr 26, 2007 10:56 pm

Another way you could achieve what you want is:

1. share files and folders that you want to publish into a new folder within vault
2. use the shadow folder service to export this new folder to a local folder on HD
3. use IIS to publish this local folder - this way its just up to IIS securities



Cu,
Kasti.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Fri Apr 27, 2007 10:09 am

Ironically, this is exactly what I was doing, though I was hoping for an easier solution (i.e., one that didn't require managing Shadow Folders and IIS).

What I would like to see is SourceGear update GetFile.aspx to take optional Username and Password parameters (to bypass the login screen). This way everyone is happy -- I get a simple solution and SourceGear can still say that their database is locked down.

Locked