Move image to trash MediaManager

Hello to Everyone!
I’m trying to use the function to move an image to the mediaManager trash with a button that can be used by a registered user.

The code seems easy to me, but it doesn’t work. Considering that many other developers may have this need of mine, can you please help me? I report the code below.

Thanks !

note
I used a url copied directly from mediaManager to be sure about the address, while tested the function, later I would get it with a query

code into a event.jsw file (backend)
import { mediaManager } from ‘wix-media-backend’ ;

export function moveTrash ( fileUrls ) {
return mediaManager . moveFilesToTrash ( fileUrls )
. then (() => {
console . log ( ‘Success! Files have been trashed.’ );
})
. catch (( error ) => {
console . error ( error );
})
}

code into the page
import { moveTrash } from ‘backend/event.jsw’

$w . onReady ( function () {})
export function button1_click ( event ) {
let dbUrl = https://static.wixstatic.com/media/f9c7a0_682bdb1feb274cb1b0aec3448e6f42d4~mv2.jpeg
moveTrash( dbUrl ). then (() => { $w ( “#text1” ). text = “YEAH!” })
}

export function button1_click(event) {
let dbUrl = 'https://static.wixstatic.com/media/f9c7a0_682bdb1feb274cb1b0aec3448e6f42d4~mv2.jpeg';
 moveTrash([dbUrl]).then(() => { $w("#text1").text = "YEAH!"  })
}

Also return the backend function once fulfilled.

Thanks J.D. for the quick reply, but the correction, which I report here, still does not work. Do you know why?

   let dbUrl = 'https://static.wixstatic.com/media/f9c7a0_682bdb1feb274cb1b0aec3448e6f42d4~mv2.jpeg';
           
 moveTrash([dbUrl]).then(() => { $w("#text1").text = "YEAH!" })
 
 /// BACKEND \\\
 
 
export function  moveTrash(fileUrls) {
  return mediaManager.moveFilesToTrash([fileUrls])

I don’t know (but I don’t see your entire code).

Even this still does not work man:

export async function myMoveFilesToTrashFunction(fileUrls) {
    return mediaManager.moveFilesToTrash(fileUrls)
        .then(() => {
            return
        })
        .catch((error) => {
            console.error(error);
        })
}

Brendan