[geeklog-modules] Re: Using the GL upload.class library with multiple images

Tony Bibbs tony at tonybibbs.com
Tue Jan 28 21:45:22 EST 2003


Sounds like you are implying that the class no longer works with the
current version of PHP, right? If so, I don't get it because I'm
running 4.3 on the server for iowaoutdoors.org and it seems to be
working fine.

Confused...

--Tony

Blaine Lang wrote:

> Tony,

>

> I'm trying to use your upload class with a form that has multiple file type

> input fields. I have logging in the class and am getting the following

> output. I am testing with small files

>

> ERRORS

> File, Array, is bigger than the 20480 byte limit

> Mime type, Array, not in list of allowed mime types

>

> Since HTTP_POST_FILES is now an array of arrays

> - using $curfile = current($HTTP_POST_FILES) - will return an array, so I

> have tried some tests of referencing element 0 which from my debug output is

> the real file name.

>

> $pos = strrpos($curfile['name'][0],'.') + 1;

> $fextension = substr($curfile['name'][0], $pos);

> $filename = $_USER['username'] . '.' . $fextension;

> $upload->setFileNames($filename);

> $upload->setPerms('0644');

> $upload->setMaxFileSize(20480); //20KB

> reset($HTTP_POST_FILES);

> $upload->uploadFiles();

>

> Any tips?

>

> Blaine



--
+-------------------+--------------------------------------------------+

|Tony Bibbs |[R]egardless of what you may think of our penal |

|tony at tonybibbs.com |system, the fact is that every man in jail is one |

| |less potential fisherman to clutter up your |

| |favorite pool or pond. --Ed Zern |


+-------------------+--------------------------------------------------+




More information about the geeklog-modules mailing list