• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
uploading video

#1
[eluser]nuttynibbles[/eluser]
hi, im having problem uploading videos onto my server. working with images are fine but not videos. i've added the necessary video extension to the mimes file but nothing seems to work. it keeps giving me error.

here is the array for more info:
Array ( [upload_path] => /home/lala/public_html/lala/application/uploads/lala_video [allowed_types] => asf|wmv|mpg|mpeg|jpeg|avi|flv|mp3|mp4|3gp [overwrite] => [max_size] => 102400 [max_width] => 0 [max_height] => 0 [encrypt_name] => [remove_spaces] => 1 [file_name] => [image_width] => 0 [image_height] => 0 [image_library] => [library_path] => [source_image] => [create_thumb] => [maintain_ratio] => 1 [width] => 0 [height] => 0 )

#2
[eluser]nuttynibbles[/eluser]
hmm anyone ever encounter this problem before? able to upload images but not videos or mp3?

is there some kind of configuration that would need to be done??

using filezilla, im able to upload a video file format. so defintely it has nothing to do with the server configuration.

pls help tks.

#3
[eluser]Sumon[/eluser]
Is your video exceeded maximum size?

#4
[eluser]Dr.Dan[/eluser]
Check your mimes.php file in config folder , whether it contains all the necessary entries for the file types that you have allowed.

#5
[eluser]nuttynibbles[/eluser]
i did an upload of mpg/flv/mpg file but it gave me an error stating "The filetype you are attempting to upload is not allowed." i've included it in mimes.php config folder:
'mpg' => 'video/mpeg',
'mp3' => 'audio/mpeg',
'flv' => 'application/octet-stream'

i've also set the allowed_types to 'gif|jpg|asf|wmv|mpg|mpeg|jpeg|avi|flv|mp3|mp4|3gp'. this can be view from the array printed out:
Array ( [upload_path] => /home/lala/public_html/lala/application/uploads/lala_video [allowed_types] => asf|wmv|mpg|mpeg|jpeg|avi|flv|mp3|mp4|3gp [overwrite] => [max_size] => 102400 [max_width] => 0 [max_height] => 0 [encrypt_name] => [remove_spaces] => 1 [file_name] => [image_width] => 0 [image_height] => 0 [image_library] => [library_path] => [source_image] => [create_thumb] => [maintain_ratio] => 1 [width] => 0 [height] => 0 )

#6
[eluser]nuttynibbles[/eluser]
i think i figure out the problem. apparently i echo out $_FILES['file']['type'] to find out the file type and input it into mimes file. some of the vid format in mimes doesnt match i guess

#7
[eluser]Latavish[/eluser]
I found this very help piece of code here from these great forms a while ago. can't remember which thread exactly but this has been a life saver. Use this little piece of code for debugging when doing your uploads. This will save you loads of time.


Code:
// For Debugging
            echo "Mime uploaded: ".$this->upload->file_type."<br>";
            foreach ($this->upload->allowed_types as $val)
            {
                echo "allowed: "; var_dump($this->upload->mimes_types(strtolower($val))); echo "<br>";
            }

Now you can see what file type your web browser says its uploading. And take not that different web browsers may have a different file type then whats currently in your mimes.php. Eather way this code may be of some use for ya ....lord knows its been a life saver for me.

cheers

Latavish

#8
[eluser]chazy (aldever calvo)[/eluser]
i have exactly the same problem! whew! and up to now, i still haven't solved this problem.
what did you do with yours?

my post is in this page http://ellislab.com/forums/viewthread/187211/


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.