Download file - get REAL filename
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Download file - get REAL filename

  1. #1
    Join Date
    Dec 2011
    Posts
    1

    Download file - get REAL filename

    Hi all,

    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

    Any ideas?

    Thank you

  2. #2
    Join Date
    Jun 1999
    Location
    SW Missouri
    Posts
    3,422

    Re: Download file - get REAL filename

    Have you looked in the Response Header?
    Norm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center