View Full Version : Upload Scripting
livepvp 07-30-2007, 10:01 AM I am currently trying to investigate whether or not it would be possible to create a php/ajax upload script that would display a progress bar, and allow you to upload the file to another server. So, instead of it being uploading to the webserver that the site is running from, it uploads the file to a "File Server" on the same network.
Any suggestions? I have thought out the workings of everything accept uploading to another server.
Xeentech 07-30-2007, 10:27 AM That's definitely possible.
When I did this I had to use an iframe tag because as soon as the HTTP form starts uploading the XMLHTTPRequsts stop working and the progress bar won't work.
As for the other server bit, you'll need the two servers to comunicate if you're going to use XMLHTTPRequest, as it will only allow you to request from the same domain name, an effort to stop "XSS" attacks.
SoftWareRevue 07-30-2007, 10:33 AM Something like PHP AJAX (http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml)?
livepvp 07-30-2007, 10:48 AM Yes, just need to figure out how to get the two servers to communicate ~
SoftWareRevue 07-30-2007, 10:54 AM Maybe SSLBridge (http://www.sslbridge.com/) would help?
livepvp 07-30-2007, 12:13 PM hmm, that is an interesting alternative, is it possible to upload to a remote ftp directly from a website?
HostSentry 07-30-2007, 03:08 PM hmm, that is an interesting alternative, is it possible to upload to a remote ftp directly from a website?
Just have the serverside script put the content in the directory you want to FTP. Why not just use FTP though in the first place?
daejuanj 07-30-2007, 03:28 PM Though that's possible, why not use WebDav. It's more effiecent that FTP, since Webdav allows you to pipe multiple transfers, as opposed to ftp opening a new connection for every transfer, not to mention it's secure, and the files are easier to access.
But than again, I don't know what you're using this for.
Steve_Arm 07-30-2007, 04:37 PM Do some googling
http://encodable.com/filechucker/
livepvp 07-31-2007, 07:37 AM Do some googling
http://encodable.com/filechucker/
That isn't the issue, I was looking for a easy solution for using the php file upload functions and then using either a ftp, or some other solution like webdav as the above poster suggested to upload the files onto a remote server.
livepvp 07-31-2007, 09:04 AM The application for this is an media website, where users will be able to upload their mechima videos to our servers.
HostSentry 07-31-2007, 10:25 PM God I cannot believe I forgot to suggest this. Flash is a great way to display a progress bar while uploading data. Thanks to recent format I don't have an example for you... but it is really rather easy.
livepvp 08-01-2007, 07:33 AM Do you know of anywehre I can find a codesnippet of the action script =D ?
horizon 08-01-2007, 08:21 AM Is this request about uploading images or other binary / text files to the server end ?
livepvp 08-01-2007, 08:23 AM about uploading video files that are encoded in divx/xvid, yes.
horizon 08-01-2007, 09:19 AM In that case, 4images gallery script is the way to go - http://www.4homepages.de . Numerous MODs can be installed for FREE and your request is included already. ;)
easytouch 08-03-2007, 11:41 AM I would recommend
http://extjs.com/
its a GUI library with a nice Upload Script as you describe it.
Example
http://www.tdg-i.com/extexamples/fileupload/
|