Changeset 6393

Show
Ignore:
Timestamp:
12/16/07 21:44:48 (1 year ago)
Author:
matt
Message:

Allow numbers in content type to allow for types like 3gp. Fixes #5449. Hat tip: meledin, DD32.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-app.php

    r6364 r6393  
    404404        elseif ( empty( $slug ) ) // just make a random name 
    405405            $slug = substr( md5( uniqid( microtime() ) ), 0, 7); 
    406         $ext = preg_replace( '|.*/([a-z]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); 
     406        $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); 
    407407        $slug = "$slug.$ext"; 
    408408        $file = wp_upload_bits( $slug, NULL, $bits);