Unable to update DB record with uploaded file name

Hi,

I followed the steps in the docs about how to insert a filename after upload, however I am having problems updating a record to include the uploaded file name.

The file uploads properly in the designated folder, but the filename doesn’t get recorded in the pre-existing record I am trying to update.
I am passing the record id via ‘mediaid’ parameter.

Can you please let me know what I’m missing? thank you.
I’ve also added a condition in the server side Update Query (saw that in another post) - see last screenshot. Not sure what I am doing wrong!

Community Page
Last updated: