Update media library attachments

edit: ok after working on this for the last hour ive finally found a solution that works without affecting uploading and without messing with ignore or reset

wp.media.frame.on('open', function() {
    if (wp.media.frame.content.get() !== null) {          
        // this forces a refresh of the content
        wp.media.frame.content.get().collection._requery(true);

        // optional: reset selection
        wp.media.frame.content.get().options.selection.reset();
    }
}, this);

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