Can’t upload image via submitting custom post from frontend

The problem was here:

<input type="file" id="_themename-advert-create-image" name="_themename-advert-create-image" />

It should be:

<input type="file" id="_themename-advert-create-image" name="_themename-advert-create-image[]" />

Still can’t understand why I should add [] in my name, but now everything is working.

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