[Zope] opinions needed on methods for file download...

Tony McDonald tony.mcdonald@ncl.ac.uk
Mon, 26 Jul 1999 11:14:48 +0100


Hi,
I have a situation where I have a lot of files in a unix directory. 
They are all 'labelled up' in an SQL database which holds data such 
as filename, date_uploaded, owner, version and mimetype.

The output DTML is similar to this at the moment, where log_entries 
is some SQL that returns filename, mimetype and idnum, whilst 
dump_file is a simple external method that puts the right 
content-type header on the data and reads it out to the browser.

<dtml-in log_entries>
<tr>
<td><a href=dump_file?filename=<dtml-var filename 
url_quote>&mimetype=<dtml-var mimetype url_quote>><dtml-var 
idnum></a></td>
<td><dtml-var filename></td>
<td><dtml-var mimetype></td>
<td><dtml-var owner></td>
<td><dtml-var uploaded></td>
</tr>
</dtml-in>

The problem is that the URLs are really clunky and the file download 
name is always 'dump_file'. Does anyone have any other thoughts on 
how this might work?
cheers
tone

------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2