Changeset 3545
- Timestamp:
- 04/24/08 06:29:30 (5 months ago)
- Files:
-
- downloadsplugin/0.10/tracdownloads/api.py (modified) (2 diffs)
- downloadsplugin/0.11/tracdownloads/api.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
downloadsplugin/0.10/tracdownloads/api.py
r3242 r3545 765 765 if not hasattr(file, 'filename') or not file.filename: 766 766 raise TracError('No file uploaded.') 767 768 # Get file size. 767 769 if hasattr(file.file, 'fileno'): 768 770 size = os.fstat(file.file.fileno())[6] … … 774 776 raise TracError('Can\'t upload empty file.') 775 777 778 # Strip path from filename. 779 filename = os.path.basename(file.filename) 780 776 781 return file.file, unicode_unquote(file.filename), size downloadsplugin/0.11/tracdownloads/api.py
r3166 r3545 811 811 raise TracError('Can\'t upload empty file.') 812 812 813 return file.file, unicode_unquote(file.filename), size 813 # Strip path from filename. 814 filename = os.path.basename(file.filename) 815 816 return file.file, unicode_unquote(filename), size
