changeset 497:85772b4cd760

changed download filename
author cmielack
date Wed, 11 Feb 2009 16:47:28 +0100
parents 1760b19df530
children 86b5589f38db
files servlet/src/digilib/servlet/PDFCache.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/PDFCache.java	Wed Feb 11 16:36:58 2009 +0100
+++ b/servlet/src/digilib/servlet/PDFCache.java	Wed Feb 11 16:47:28 2009 +0100
@@ -168,8 +168,11 @@
 		bis = new BufferedInputStream(fis);
 		int bytes = 0;
 
+		String fn = request.getParameter("fn");
+		String pgs = request.getParameter("pgs");
+		
 		response.setContentType("application/pdf");
-		response.addHeader("Content-Disposition", "attachment; filename="+filename);
+		response.addHeader("Content-Disposition", "attachment; filename="+fn+"_"+pgs+".pdf");
 		response.setContentLength( (int) cached_file.length());
 
 		logger.debug("Sending document "+filename+" to the user.");