I need to delete a file that is into a remote path.
The round is:
I stream a file to the server under the main path(/uploads/myFiles) but this file is related to a table record,so if I delete this record I want delete also the remote file.
Into my record I have stored the path that I use for streaming the file(so “/uploads/myFiles/myfile.txt”) but the ```
plugin.file.deleteFile
So my question is: does exist a way to delete the remote file without map the remote disk?Or does exist a way to specify the relative remote path to the *plugin.file.deleteFile* function?
thanks in advance
Marco
Yes, Harjo is right, you first need to get a JSFile representation of the server file (internally it is a special type of JSFile: a RemoteFile).
Then you can call delete() on it.