Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to an alternative filename

Status
Not open for further replies.

phead

MIS
Apr 29, 2004
5
GB
I have a situation where an application is saving attached documents to a directory with a unique name, so if I save "document.doc" it saves to disk as "ABCD1234".

I want to provide a link to this document, but if I use a normal HTML link I don't get the correct filename, and the browser doesn't know the filetype so struggles to understand what to do with the file.

I have the location and filename, and the original filename available to the jsp file, but don't have a clue where to start with providing a link to the original document. I've seen other websites do this by providing a link to a program, with a parameter and when that is clicked it responds with a popup to save the doc with its original filename.

Anyone got any ideas of how to get this working, or even if its a standard method, some search terms I can use to try and search for a solution.
 
if you know the file type of the original file, then send a header to transmit the file as that mime type, e.g. "application/msword" or whatever


-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top