Uploading dwg files to wordpress

Your code should work just fine. The only problem in there is that you’ve set incorrect mime type, I guess…

It should be image/vnd.dwg.

So this one should work:

function custom_upload_mimes ( $existing_mimes=array() ) {
    $existing_mimes['dwg'] = 'image/vnd.dwg';
    return $existing_mimes;
}
add_filter('upload_mimes', 'custom_upload_mimes');

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