Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.