Video Upload/Download Issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
quest4knowledge
Forum Newbie
Posts: 1
Joined: Thu Oct 13, 2005 8:31 pm

Video Upload/Download Issue

Post by quest4knowledge »

What up!

I have a php/mysql file sharing app I'm working with that will allow users to upload files and have others click links to view/download the files. The app is working FINE for the most part, but with certain video files in particular I'm getting odd results while trying to view them after the upload.

With one .avi file the upload goes through fine, but when trying to preview it via my PHP script, the browser returns a 'page not found'. If I put a path to the file in the browser's address bar it will load, but it will play audio only, not video (whereas this file is fine before uploading).

Another is a .mpeg, which also uploads fine but when trying to view it via my script I get audio without video. When entering a direct path to the file in the browser it comes through fine.

Also one when trying to view a file I got a '416 Requested Range Not Satisfiable' error, but after refreshing it was gone.

So my guess is that the files are somehow getting corrupted as they are uploaded...but unsure how, I'm just using a regular multipart/form-data post form with a file upload box. When the file is uploaded a random directory and filename are created and move_uploaded_file() is called.

Any thoughts?
Post Reply