urban Posted March 30, 2009 Share Posted March 30, 2009 hi i am trying to build a php upload from a form which will upload a 100mb file, i think i will need a progress bar as it just looks like the page has hanged. I have googled serveral scripts but have found nothing that will be simple to include into my page. Can u help Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/ Share on other sites More sharing options...
JonnoTheDev Posted March 30, 2009 Share Posted March 30, 2009 you cannot do this with purely php. requires ajax method. with 100mb you may reach the web server timeout period or the php max upload limit. check this out. http://uber-uploader.sourceforge.net/ Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796859 Share on other sites More sharing options...
premiso Posted March 30, 2009 Share Posted March 30, 2009 I would tend to use Flash for this, as it is a nice way to go. If you would like to not use flash, AJAX would be another alternative. Ajax Upload with Progress Bar As far as anything being simple, there will not be. You will have to implement etc and it will require some modifications/work. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796862 Share on other sites More sharing options...
JeanieTallis Posted March 30, 2009 Share Posted March 30, 2009 <?php // Where the file is going to be placed $target_path = "/URLfor-the-file-to-be-uploaded-to"; /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); ?> <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> This is a simple upload form, I'm not sure if it works, I aint tested it, but it looks promising. To create a progress bar, it could be done with Flash as stated in previous replies, alternatively, you would use PHP and AJAX. Check the links given for the progress bars. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796867 Share on other sites More sharing options...
JonnoTheDev Posted March 30, 2009 Share Posted March 30, 2009 This is a simple upload form, I'm not sure if it works It won't. Your missing about 75% of the required code. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796877 Share on other sites More sharing options...
urban Posted March 30, 2009 Author Share Posted March 30, 2009 Thanks for the replies i can create the upload form and upload php data to get the file onto the server. Its the progress bar bit i cant do. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796878 Share on other sites More sharing options...
JonnoTheDev Posted March 30, 2009 Share Posted March 30, 2009 Its the progress bar bit i cant do Unfortunatly you will probably have to scrap what you have done already and download a complete uploader script. Adding a progress bar isn't straigt-forward. You will see the complexity after downloading one. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796887 Share on other sites More sharing options...
urban Posted March 30, 2009 Author Share Posted March 30, 2009 Yeah i have seen quite a few, and yes they do look complicated. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796895 Share on other sites More sharing options...
Mark Baker Posted March 30, 2009 Share Posted March 30, 2009 In theory, the APC extension can do this; though I've never tried it myself Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796941 Share on other sites More sharing options...
Yesideez Posted March 30, 2009 Share Posted March 30, 2009 I've seen them done with Perl but never PHP alone. Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-796943 Share on other sites More sharing options...
urban Posted May 5, 2009 Author Share Posted May 5, 2009 Anybody got any links for a flash upload script that will be easy to adapt to my website Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-826687 Share on other sites More sharing options...
JonnoTheDev Posted May 6, 2009 Share Posted May 6, 2009 http://swfupload.org/ Quote Link to comment https://forums.phpfreaks.com/topic/151756-php-upload-with-progress-bar/#findComment-827338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.