Upload unnattached image from frontend

If you look at media_handle_upload in source you’ll see how it uses wp_handle_upload to do just the uploading part of the process without inserting an attachment.

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