I\'m using UNLINK with PHP
and AJAX
. I know that in this way is very dangerous, because everyone can delete any files. But I need to use AJAX
In your PHP:
Otherwise users can delete any file.
As for the ownership, you have to store the information who owns which file somewhere on the server side (for example a MySql-DB). Then you should consult this location before deleting the file.