Changeset 1475 for satchmo/trunk/satchmo/shop/views/download.py
- Timestamp:
- 08/31/08 22:53:01 (3 months ago)
- Files:
-
- satchmo/trunk/satchmo/shop/views/download.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
satchmo/trunk/satchmo/shop/views/download.py
r1424 r1475 5 5 from django.utils.translation import ugettext_lazy as _ 6 6 from satchmo.shop.models import DownloadLink 7 import mimetypes 7 8 8 9 import os … … 87 88 response['Content-Disposition'] = "attachment; filename=%s" % file_name 88 89 response['Content-length'] = os.stat(dl_product.downloadable_product.file.path).st_size 90 contenttype, encoding = mimetypes.guess_type(file_name) 91 if contenttype: 92 response['Content-type'] = contenttype 89 93 return response
