December 17th, 2011, 04:27 PM
Download file - get REAL filename
I am trying to download a file in java from a URL and get the returned filename that the fileserver provides, NOT the URL "filename".
For example, take this example: http://domain.com/download.php?file=latestversion
The webserver might then reply with a file called Setup5.exe
Using the getFile() function gives me "download.php?file=latestversion" but what I REALLY want to get is the actual filename, in this case, Setup5.exe
December 22nd, 2011, 06:55 AM
Re: Download file - get REAL filename
Have you looked in the Response Header?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!