Deleting image not working

I followed @ben tutorial on making an image album https://www.testworks2.nl/content/albumpagina.php. All working fine except the delete image. So I followed the tutorial again, but the image will not delete.
I keep getting error on the image delete server action.
Server action is as follows:

  1. Database Connection: blomynien2019.
  2. Under globals POST: variable for imageID (idalb_img), albumID (id_alb) and imagefile (imagefile)
  3. File remove server action: /uploadalbum/{{$_POST.id_alb}}/{{$_POST.imagefile}}
  4. Thumbnail remover server action: /uploadalbum/{{$_POST.id_alb}}/thumbnails/{{$_POST.imagefile}}
  5. Database Delete: idalb_img == {{$_POST.idalb_img}}

Any suggestions?

That is exactly what we need to be able to tell you what’s wrong. Please check the EXACT error message as explained in the following tutorial:

Actually, whenever you have any error you should always follow these steps and report the exact errors returned. This should always be the FIRST thing to do, when you have a server connect problem.

Thanks. Here is the error:
{code: 0, file: "/usr/home/testworks2.nl/htdocs/dmxConnectLib/modules/fs.php", line: 266,…} code: 0 file: "/usr/home/testworks2.nl/htdocs/dmxConnectLib/modules/fs.php" line: 266 message: "File doesn't exist. (/usr/home/testworks2.nl/htdocs/upload_album/3/)" trace: "#0 /usr/home/testworks2.nl/htdocs/dmxConnectLib/lib/App.php(163): modules\fs->remove(Object(stdClass), 'dellargeimage')↵#1 /usr/home/testworks2.nl/htdocs/dmxConnectLib/lib/App.php(128): lib\App->execSteps(Object(stdClass))↵#2 /usr/home/testworks2.nl/htdocs/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Array)↵#3 /usr/home/testworks2.nl/htdocs/dmxConnectLib/lib/App.php(71): lib\App->exec(Object(stdClass))↵#4 /usr/home/testworks2.nl/htdocs/dmxConnect/api/content/bedrijfimg/delete.php(93): lib\App->define('{\n "meta": {\n ...')↵#5 {main}"

It says the file is not found. It only shows the (correct) directory. delimage1

Your path seems to be wrong. From the error message, as you can see it points to the folder and the image name is empty. Check what your value for the image name returns.

Think I found the solution. De POST var for the imagefile should be the same as fieldname. In this case not “imagefile” but “afbeelding”