SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2005
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What are all the possible MIME Types of MP3?

    I'm making a file upload class that handles MP3 uploads. I'm using an IF statement to determine the filetype of what is being uploaded. I went onto the http://filext.com/file-extension/MP3 site and used all the file types they have for MP3s and put this into my code...

    PHP Code:
    // Checks for all MP3s
    if (    $this->fileType == 'audio/mpeg' or
        
    $this->fileType == 'audio/x-mpeg' or
        
    $this->fileType == 'audio/mp3' or
        
    $this->fileType == 'audio/x-mp3' or
        
    $this->fileType == 'audio/mpeg3' or
        
    $this->fileType == 'audio/x-mpeg3' or
        
    $this->fileType == 'audio/mpg' or
        
    $this->fileType == 'audio/x-mpg' or
        
    $this->fileType == 'audio/x-mpegaudio'
                            

    Thing is, this doesn't seem to cover them all. It works on some MP3s but not on others... Are there anymore MIME types for MP3 that I seem to be missing? I'm using Firefox on a Mac.

    Hope you can help me!

    {

  2. #2
    SitePoint Enthusiast SecondV's Avatar
    Join Date
    Jan 2006
    Location
    Kentucky
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    audio/x-mpegurl
    audio/x-mpeg-3

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2005
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers man. You reckon that should cover it all then?

  4. #4
    SitePoint Enthusiast SecondV's Avatar
    Join Date
    Jan 2006
    Location
    Kentucky
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it should.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •