ftp - upload via a web form |
[eluser]bugboy[/eluser]
I've looked all over and in the user guide but i can't find an answer. Using the CI ftp class can i use it to upload a file using a web form? If so how as there is no mention of it. Help please. I need to upload video files. do i need to roll my own? cheers
[eluser]tonanbarbarian[/eluser]
i do not see how you could use the ftp class to upload a file from a clients machine to the server the upload action has to happen from the client not from the server so the could would have to be running on the clients pc requiring them to have php installed as well as CI etc. if you want something to be able to ftp a file from a client pc to your server you should look at a java applet or maybe a flash (not sure if flash can do that but i assume it can)
[eluser]bugboy[/eluser]
i see i found this on the php site where they use a webform. so i wondered if i could extend the ftp class. Code: <?php
[eluser]tonanbarbarian[/eluser]
ok what that code is doing is taking the file that was already uploaded via http and ftping it back to the server the reason to do this is so that the permissions on the file can be set exactly for the user who owns the site some CMSes do this mostly it is because the webserver, such as apache, ususally runs under a different user account than the owner of the site and so often the permissions are such that after the file has been uploaded the account owner cannot delete the files etc because the permissions are not correct
[eluser]bugboy[/eluser]
oh i see. so you can't technically upload like real upload using ftp. all you can do is move as such? i need to be able to upload files as large as 50mb i thought yeah ftp would do the trick. whats this flash thing? many thanks
[eluser]tonanbarbarian[/eluser]
you could get a flash or java applet to do the ftp for you i definately know that there are java applets that will ftp files from the clients pc to your server am not 100% sure that any flash exists to do the same but it might PHP can be used to upload 50Mb files, you just need to config PHP and your webserver to allow it i do not recommend it for files that large however mostly because the java applet has ftp resume so that the file can be stopped and started where as a http upload via php would not be able to do that
[eluser]bugboy[/eluser]
it might be easier to use youtube and transfer the video across?
[eluser]bugboy[/eluser]
any recommendations for the java applet? with pref for free.
[eluser]Sean Murphy[/eluser]
If you explain a little more why need to have a file FTPed to a server from a web form, it would help to suggest the best approach. As long as there is nothing preventing you from uploading 50MB files to your webserver temporarily, you could certainly use the approach taken in the example you posted above using the Upload and FTP libraries (no modification needed). But there's really no reason take this approach unless you need the files stored on a server other than the one your application is hosted on. If file upload size is the only thing you're concerned about, use the suggestions on this page: http://www.radinks.com/upload/config.php If you still want to use a Java applet, someone commented about using JUpload here: http://us.php.net/manual/en/features.fil....php#60349
[eluser]bugboy[/eluser]
hello thanks for replying. i need to upload a video files that maybe sometimes over 10mb up to 50mb and the server only allows a post max of 8mb I'll look into the suggestions you made but i hope that makes more sense of what i'm after. Cheers |
Welcome Guest, Not a member yet? Register Sign In |