Exchange file on upload using original filename?
I have a form uploading files correctly to server and write filename to database. I have choosen a prefix for the files which are profile images for users and set filenames to increment for each new user added. (Ex: prefix_1.png, prefix_2.png and son on). This all works fine. I also have a form where users can update their information when logged in. From there they are able to update their standard user image to one of their own choice. It works fine but the problem is a new image is added on upload and I would like the old image to be replaced with the new using the same original filename. (Ex: original file: prefix_1.png new imagefile uploaded on update becomes: prefix_1.png)
In the upload file server behaviour on the update page I have set "if file exist" to overwrite and on the second tab/dialog Ive tried almost every setting except for the default file field where Ive inserted what was said in the guide so that should be correct at least!
Ive enclosed 4 images of the insert and update server behaviour dialogs so its easier to understand how I set the options! Could someone please check and see what's wrong? I just want to update the previously inserted image with a new one but use the same original filename!