Jump to content

uploading videos


astralaaron

Recommended Posts

I just want to tell you that the movies would take a lot of your bandwidth (and I mean a lot) + it would take several hours before the movie had been uploaded. Maybe that's why you want that AJAX script :)

Link to comment
Share on other sites

I just want to tell you that the movies would take a lot of your bandwidth (and I mean a lot) + it would take several hours before the movie had been uploaded. Maybe that's why you want that AJAX script :)
yeah the bandwidth doesnt matter, this is what they want.. I need to be able to upload WMV atleast 10 MB
Link to comment
Share on other sites

in my php.ini file it is set like this; Whether to allow HTTP file uploads.file_uploads = On; Temporary directory for HTTP uploaded files (will use system default if not; specified).upload_tmp_dir = "C:/wamp/tmp"; Maximum allowed size for uploaded files.upload_max_filesize = 20Mwhen I upload a file that is 800kb it works fine.. when I try to upload one that is 11.1MB it is an error..why?

Link to comment
Share on other sites

The web server also has a maximum limit on the size of a request, independent of PHP. IIS6 stores that in a file called metabase.xml, I don't know how Apache is set up. Make sure you are also using the hidden form input to say what the max filesize is, it won't work correctly without that.There's no way to show a progress bar with an upload because the web server doesn't know how big the file is. The web server might know that you have uploaded 500kb so far, but it doesn't know what the total will be so it doesn't know what percentage complete it is.

Link to comment
Share on other sites

The web server also has a maximum limit on the size of a request, independent of PHP. IIS6 stores that in a file called metabase.xml, I don't know how Apache is set up. Make sure you are also using the hidden form input to say what the max filesize is, it won't work correctly without that.There's no way to show a progress bar with an upload because the web server doesn't know how big the file is. The web server might know that you have uploaded 500kb so far, but it doesn't know what the total will be so it doesn't know what percentage complete it is.
thx
Link to comment
Share on other sites

There's no way to show a progress bar with an upload because the web server doesn't know how big the file is. The web server might know that you have uploaded 500kb so far, but it doesn't know what the total will be so it doesn't know what percentage complete it is.
This is possible in .NET as long as you can trust that the browser will be sending you an accurate Content-Length in the Request header. I don't know about PHP, but in .NET you can hook into the BeforeRequest event which fires before the Request is processed. At this point, you can look at all the Request headers - including the Content-Length - to see if you want to continue processing the request or if you want to reject or redirect it. If you could latch into something like this in PHP, you would have the (supposed) Content-Length without having to wait for the entire Request to finish processing. If you stored that data into a session variable, you'd be able to ping the server using AJAX to see how far along you are in the upload.The major hurdle here, I believe, is whether or not you can execute code before the Request is processed in PHP. If you can't then, yes, a progress bar would be impossible.
Link to comment
Share on other sites

Yeah, that's a good point. I don't think that the current versions of PHP can do anything before the request gets processed, it is my understanding that the web server receives the entire request (including the uploaded file) and then fires up PHP. We might see future versions of PHP try to hook deeper into the server, but I don't think anything like that is available right now.

Link to comment
Share on other sites

I thought you could with cakePHP or zend. I know its possible because I've seen it many, many times. Try googling for this: "PHP upload progress bar". Hopefully that will return something.

Link to comment
Share on other sites

Maybe you should consider using ftp to upload it? Just check for file type and such, then upload it through ftp.
wait what do you mean?this is for the admin of the website to upload them so I dont have to do it each time
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...