added new files that delete images from the database and the server, and checks also for a valid redirection path and. It also checks that the files being deleted are valid