Naming zip files

Results 1 to 2 of 2

Thread: Naming zip files

  1. #1
    Join Date
    Dec 1969

    Default Naming zip files

    I have an asp page that retrieves file names from a database, and allows the user to download them. The files are zipped. The whole process works well except that in the message box that gives the user the choice of either opening or saving the file, the file name is always "". "ImageDocument" is the name of my asp page. How can I get the file name to display as the file&#039;s name, not the name of the page.<BR><BR> strDocType = right(strPath,4)<BR> Select Case strDocType<BR> Case ".pdf"<BR> Response.ContentType = "application/pdf"<BR> Case ".zip"<BR> Response.ContentType = "application/x-zip-compressed"<BR> end select<BR> <BR> imagefield = retreiveImage(strPath)<BR><BR> Response.BinaryWrite (imagefield)

  2. #2
    Join Date
    Dec 1969

    Default RE: Naming zip files

    Response.AddHeader "Content-Disposition", "filename=" & strFileName & ".zip"<BR>

Posting Permissions

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