Forum Moderators: coopster

Message Too Old, No Replies

A Java Uploader.

with PHP?

         

ahmedtheking

12:54 pm on Jan 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, this is a continuation from my post about uploaders through php. Thanks to everyone who suggested ones, but it seems that they're nice and dandy when it comes to uploading to a static location, but when authentication and dynamic directories (ie user dirs) are put into the equation, they don't work!

So, what are my options? I don't know! My initial idea was to pay for a Java or Flash uploader, but can these work with my current framework? Can the uploader send data to a PHP script for processing?

Something like this:

You > Click to upload your file >> it uploads to a tmp dir via Java or Flash and then the $_FILE data is sent to a PHP page and the page reloads, I can't be bothered to fiddle with AJAX!

Any ideas? All I need is the initial uploader to upload it to the temp dir, the PHP can take over!

coopster

3:49 pm on Jan 17, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



but when authentication and dynamic directories (ie user dirs) are put into the equation, they don't work

Sure they do. It is quite common to authenticate a user prior to allowing them to upload a file. And that makes moving the uploaded file to the correct directory that much easier. Can you explain in more detail what you believe PHP is not capable of accomplishing for you?

ahmedtheking

4:54 pm on Jan 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well yeah the user is always already authenticated, but then when the script then decides that it's going to send the post data to a processing script, such as your php one, and it does it outside the browser, then authentication is lost and it means it could get hacked.

I tried using a CGI/Perl one, but found it very hard to pass vars between it and PHP.

There must be a way, a hack, in which you can tell PHP what to call the tmp file!