XUpload - Stripping Progress Meter/Bar from XUpload

Message
Author
KarlP
Posts: 2
Joined: Oct 18, 2006 9:01 pm

Stripping Progress Meter/Bar from XUpload

#1 Postby KarlP » Oct 18, 2006 9:31 pm

Hi, does anybody know how I can implement just the Popup Window (Progress Meter) functionality into an existing PHP application. I dont want XUpload doing anything except showing the upload status of the files that my script is uploading.

As it is at the moment XUpload does everything for me and this is what I dont want. I know that I can create my own styled upload form, but this doesn't give me any control over the validation of the files or how the files are stored (Unless I learn Perl, in which case I could have just wrote it myself).

Currently, the PHP application that I am trying to implement XUpload into stores the uploaded files in a database and also perfoms additional validation to ensure that the user hasn't exceeded their upload limit. Therefore I need to either, edit XUpload to perform the extra validation and to store the files in a database, or (from my perspective) the easier option, is to take the Popup Window (Progress Meter) from XUpload and incorporate it into the already functioning PHP upload script.

Any help with this would be greatly apreciated.

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

#2 Postby PilgrimX182 » Oct 19, 2006 5:43 am

The truth is: you can't track uploads with PHP(there's one non-official patch to do this, also I've heard this will be implemented in PHP5.2).
So you can't use same PHP script for uploads but show progress with XUpload.
Possible workaround is to upload files with XUpload, then validate them and move into DB from disc.
If you need validation on-fly inside XUpload, we can do that for you for reasonable fee.

KarlP
Posts: 2
Joined: Oct 18, 2006 9:01 pm

#3 Postby KarlP » Oct 19, 2006 1:32 pm

Hey, yes im fully aware of the fact that you can't trakck uploads using PHP. That's not what I was asking. The upload process for perl/php is still the same, it's just PHP doesn't allow the user to access the raw html data that is being posted, whereas perl does.

What I was asking is, can we not upload with php, but get the data from perl using XUpload, thereby combining the two.

So the pseudo would look something like this:

1) Select files, etc. and init upload with PHP script
2) Call the .cgi (XUplopd) script when upload is initialized
* Perl script monitors upload in a seperate window (the popup)
3) Upload is complete and my php script handles the file validation and storage

Im thinking that the .cgi call could be made using javascript when the user clicks the upload button. Therefor in reality XUpload isn't involved with anything except monitoring my already uploading files by accessing the web servers raw html data.

chrisdpucci
Posts: 9
Joined: Oct 11, 2006 6:15 pm

#4 Postby chrisdpucci » Oct 20, 2006 3:52 am

xupload allows you to pass all post variables seamlessly through it and retrieve them on the other side very easily. I also have a very intensive php upload routine but I found that all I really need to do is use xupload for the upload portion of the process, (which allows the progress bar functionality I want), and then do all of my php "work" on the other side. If you do it correclty it should fit with any application you try to implement it with.

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

#5 Postby PilgrimX182 » Oct 20, 2006 10:53 am

Not sured what you mean "Init Upload with PHP". File Upload is POST request, it should be sent from HTML page(.php page you ment I guess) directly to upload.cgi (no way to send to upload.php first, then validate, then redirect to upload.cgi). So you can't do PREvalidation with PHP, but only POSTvalidation.

XUpload can send POST request with uploaded files info & other form fields to your PHP script. Specify url to your PHP script in 'url_post' config field.
You can set 'url_post' to post.cgi example script that print all POST fields sent by XUpload to view what fields you need.

Sorry for lack of documentation inside the release, I will do that someday :D