Problem when editing a record, the attachment does not change in the directory

in radsystems 8.1.8 phprad classic project, when editing a record that contains a file and editing deletes the file, the file is not deleted from the directory.





Try uploading a new file without click on the delete button on the old file.

does not allow it because only one file is allowed in the registry

Someone will have the solution, I’m waiting.

This might be a bug, but what you can do is use Page Events to check and delete the old file.

Could you guide me with the code?

From Action Before Edit, write your PHP code to check the database for that record image and then delete it. That way the old image will no longer be in the folder, but you will have to check the folder where it is being added, as it seems it generates several versions of the image you upload in small, medium, and large folders, and the normal image in the parent folder.

Could you please help me with what I have to put, because I can’t do it, thanks

Could you tell me the code that works to perform this action, please, I can’t do it, please help.