V
V
Vladimir Borisyuk2018-03-24 10:16:35
TinyMCE
Vladimir Borisyuk, 2018-03-24 10:16:35

How to remove a picture from disk when deleting it in tinymce editor?

Attached to the textarea is tinymce. I insert an image, it is uploaded to the server in the uploads/ directory and has a unique name. All contents of the textarea are stored in the database, and a link to the images is saved. After editing, if you delete the image in the editor, then only the link is deleted, the file itself remains on the disk. How to remove it from disk when deleting in the editor?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mShpakov, 2018-03-27
@Flight404

1. determine that you are deleting the picture (event)
2. send a deletion request to the
server 3. the server checks that this picture is not used anywhere else and if ok, then deletes it (so as not to delete pictures that are used in several texts)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question