Reply to Uploading mp3 files

Uploading mp3 files new!
by Roger, 16 years, 5 months ago
I can upload images fine, but for some reason not mp3s. I get an "error: Incorrect type of file" message. My php.ini file allows a max size of 10MB and the mp3 I try to upload is only 2MB.

Here is what I have:
$fileMP3 = new upload($_FILES['file_mp3']); 
if ($fileMP3->uploaded) {
  $fileMP3->allowed = array('audio/mp3','audio/wma');
  $fileMP3->process('/home/mydir/public_html/uploads/');
}
if ($fileMP3->processed) {
  echo 'Success';
  $fileMP3->clean();
  exit;
} else {
  echo 'error : ' . $fileMP3->error;
  exit;
}

where file_mp3 is the name of my form field. I assume the answer lies in the allowed mime-type but this seems to be correct. Is there something else I'm missing?

Thanks,
RogerReply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important