SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
Stripping Progress Meter/Bar from XUpload

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
KarlP



Joined: 18 Oct 2006
Posts: 2

PostPosted: Oct 18, 2006 9:31 pm    Post subject: Stripping Progress Meter/Bar from XUpload Reply with quote

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.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Oct 19, 2006 5:43 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website AIM Address
KarlP



Joined: 18 Oct 2006
Posts: 2

PostPosted: Oct 19, 2006 1:32 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
chrisdpucci



Joined: 11 Oct 2006
Posts: 9

PostPosted: Oct 20, 2006 3:52 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1107
Location: Undisclosed location

PostPosted: Oct 20, 2006 10:53 am    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group