Jump to content

[SOLVED] uploading .flv files


bruckerrlb

Recommended Posts

Hello,

 

I am trying to tweak an old script to upload videos, and I am wondering if anyone knows how I can check to make sure a flv file is something being uploaded. For example,  the swf I have

($_FILES["file"]["type"] == "application/x-shockwave-flash")

 

Yet not sure what I could use for flv.

 

Link to comment
https://forums.phpfreaks.com/topic/78007-solved-uploading-flv-files/
Share on other sites

try to upload any file

<?php
echo '<pre>';
print_r($_FILES);
echo '</pre>';
?>
<html>
<body>

<form action="<? $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>

</body>
</html>

This is the code that it gave me

 

(
    [file] => Array
        (
            [name] => WIRELESS WORLD FULL_112K.flv
            [type] => application/octet-stream
            [tmp_name] => /tmp/phpNugkNo
            [error] => 0
            [size] => 207337
        )

)


 

When I first tried to do this, I spelt octet wrong, that's why it didnt' work!! Anyway, I was reading that using application/octet-stream isn't good to do because people can upload viruses to the server. Yet, since this is for just one person to use, and they have to be logged in to even see this page, I doubt they are going to want to comprimise their own server.

 

Thanks for the help!

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.