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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)