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

Blaine Lang langmail at sympatico.ca
Tue Jan 28 22:30:03 EST 2003


Sorry Tony, no that was not what I was implying. Its a new piece of code I'm
working on..

After you pointed me to the example in admin/submit where you can upload 5
images - I got myself straightened out. I had forgotten about that example
was there.

My problem was that how I was creating $filename
 $upload->setFileNames($filename);

I was not creating an array of filenames. Once I did that my code worked.

So far - it works great and has a lot of control.

Thanks,
Blaine


----- Original Message -----
From: "Tony Bibbs" <tony at tonybibbs.com>
To: "Blaine Lang" <langmail at sympatico.ca>; "geeklog-modules"
<geeklog-modules at lists.geeklog.net>
Sent: Tuesday, January 28, 2003 9:45 PM
Subject: [geeklog-modules] Re: Using the GL upload.class library with
multiple images


> 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                  |
>
> +-------------------+--------------------------------------------------+
>
> _______________________________________________
> geeklog-modules mailing list
> geeklog-modules at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-modules




More information about the geeklog-modules mailing list