[Erp5-report] r14109 - /erp5/trunk/products/ERP5/Document/PDFDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 18 10:25:09 CEST 2007


Author: ivan
Date: Wed Apr 18 10:25:04 2007
New Revision: 14109

URL: http://svn.erp5.org?rev=14109&view=rev
Log:
Try to return the original filename.

Modified:
    erp5/trunk/products/ERP5/Document/PDFDocument.py

Modified: erp5/trunk/products/ERP5/Document/PDFDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PDFDocument.py?rev=14109&r1=14108&r2=14109&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PDFDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/PDFDocument.py Wed Apr 18 10:25:04 2007
@@ -76,6 +76,9 @@
       it is always a zip because multi-page pdfs are converted into a zip
       file of many images
     """
+    if self.getSourceReference() is not None:
+        RESPONSE.setHeader('Content-Disposition', 
+                           'attachment; filename=%s' %self.getSourceReference())
     if format is None:
       RESPONSE.setHeader('Content-Type', 'application/pdf')
       return _unpackData(self.data)




More information about the Erp5-report mailing list