Jump to content

file upload issue


will_jones

Recommended Posts

I am building a site where users can upload mp3 files.

Certain mp3 files will not upload. I can get it to work for some but not others. Any ideas why this is. I don't think its a protected mp3 issue as i checked that but using the below code, some files display their attributes and some don't. >:(

The code simplified....

echo '

<form enctype="multipart/form-data" action="" method=post>

<input type="hidden" name="MAX_FILE_SIZE" value="10000000">

<input name="userfile" type="file">

<input type="submit" value="upload tune">

</form>';

echo $_FILES["userfile"]["name"];

echo $_FILES["userfile"]["type"];

echo $_FILES["userfile"]["size"];

Anybody come across similar problems ????

Link to comment
https://forums.phpfreaks.com/topic/161298-file-upload-issue/
Share on other sites

The default maximum file size for uploads is about 5MB; which is probably the reason why only some are failling. You are using the "MAX_FILE_SIZE" HTML attribute but this isn't always guaranteed to work.

 

Take a look at this; has some suggestions on how to increase your max. file upload size.

Link to comment
https://forums.phpfreaks.com/topic/161298-file-upload-issue/#findComment-851150
Share on other sites

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.