[geeklog-devel] Downloader and Upload classes

Blaine Lang geeklog at langfamily.ca
Tue Mar 23 08:52:30 EST 2004


I have a plugin that uses these two classes and used a plugin config variable to define the allowable filetypes that could be uploaded and downloaded.

I wanted to use the same define to set the allowable upload and download filetypes in the class but the class uses two different array definition methods.

The upload.class uses this method
   $this->_availableMimeTypes =   array(
        'application/pdf'     => '.pdf',
        'application/x-shockwave-flash'  => '.swf',
        'application/msword'    => '.doc',
        'application/vnd.ms-excel'   => '.xls'
    )


The downloader.class uses the reverse method 
   $this->_availableMimeTypes = array(
       'tgz' => 'application/x-gzip-compressed',
       'gz' =>  'application/x-gzip-compressed',
       'zip' => 'application/x-zip-compresseed',
       'tar' => 'application/x-tar',
       'php' => 'text/plain',
       'phps' => 'text/plain'
    )

There may be a reason this was done this way -- or was the classes were developed at different times and thats just the way it is.

Should we change one and align them to use the same method?

Blaine



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20040323/9a935911/attachment.html>


More information about the geeklog-devel mailing list