How to add filetype to meta value when using wp_upload_bits?

Ended up using wp_handle_upload(), which puts MIME type into the DB automatically. See http://codex.wordpress.org/Function_Reference/wp_handle_upload

One thing to note, this function enters the file in the DB as post meta and not as an attachment. wp_insert_attachment() would do the latter.