XUpload - Passing data through a different Superglobal Variable in PHP

Message
Author
bsprogs
Posts: 11
Joined: Jul 02, 2007 3:20 am

Passing data through a different Superglobal Variable in PHP

#1 Postby bsprogs » Jul 02, 2007 9:22 pm

I've been working with the free version of XUpload and I must say it's quite amazing. Good work guys (and girls)!

With a general upload form, sending the information to a PHP page, all of the form information, including the uploaded file(s), are passed to the $_FILES superglobal variable.

Using XUpload, I believe it's the cgi that handles the upload and the data is passed to the $_POST superglobal variable in PHP.

Is it possible to keep the progress bar but let PHP handle the file uploading so that I can continue to use my original upload script which is based off the $_FILES variable?

I'm wondering because I've got a few hundred lines of code for my uploader class that all revolve around the $_FILES variable.

The is really the only thing holding me back from ordering the pro version. If I know it can be done relatively easily, the better progress bar alone is worth the investment :)

Thank you.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Jul 04, 2007 6:45 am

This is throretically possible but pretty complicated and requires custom development.

bsprogs
Posts: 11
Joined: Jul 02, 2007 3:20 am

#3 Postby bsprogs » Jul 04, 2007 8:34 am

PilgrimX182 wrote:This is throretically possible but pretty complicated and requires custom development.
I spent a few hours at work trying to figure this out and here is something I came across. It's an extension for PHP 5.2.x that allows PHP to send data about a files that is being uploaded.

http://blog.liip.ch/archive/2006/09/10/ ... p-5-2.html

I'll begin building from this and let you know what kind of PHP progress I can make. Possibly a future idea for XUpload to satisfy us PHP only guys/girls (only meaning no cgi/perl).

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Jul 04, 2007 11:16 am

I knew this new PHP feature. It's been announced long ago and yes, probably we will use it for new pure-PHP version of XUpload. But not many hosters have PHP 5.2.x yet. Thanks for link anyway.