I appreciate this is a probably a niche one, and possibly too dangerous for inexperienced users - but: it would be nice to be able to delete a file from the cluster before it has downloaded onto your local machine.
For example: I’m waiting for some large files to sync onto my system from a slow peer. I know the files in question aren’t actually required (they’ve been superseded by alternative versions) - so as soon as they finish downloading, I will be deleting them.
It would be nice to be able to delete (with appropriate warnings of course) a file from the Out of Sync Items window, so that it doesn’t bother downloading, and it marks the DB as though it had been deleted (propagating the change to other peers).
Unfortunately I wasn’t able to access the source to delete it manually.
In this case, I was able to workaround the issue by touching the file path on my receive side, and then restarting Syncthing (as I couldn’t force a rescan whilst it was in ‘Syncing’ mode).
I tried this and indeed ended up with a conflict file instead.
I’m also looking for a way to delete (an ignored file) from the directory tree of the global model, without first downloading the file.
For example: I have ignored bigfile.zip on my device. I now want to delete bigfile.zip on all connected devices, without first downloading it. How would I go about this?
I tried to trick Synching as follows:
Disable fs watching on local device
Ignore bigfile.zip on local device
Make bigfile.zip on remote device (bigfile.zip has never been seen by local device)
Create an empty file on local device called bigfile.zip
Unignore bigfile.zip on local device
Trigger a rescan of bigfile.zip to detect it has been added to local device
Immediately delete bigfile.zip from local device after rescan, to trigger deletion from all devices
However this causes a sync conflict, resulting in the local device still downloading the whole file (renamed to bigfile3.sync-conflict-20210706-063508-6FSPH2I.zip).
I’m currently evaluating if it’s possible to make a Syncthing client wrapper, with the ability to sync placeholders files akin to Resilio Selective Sync. Deleting a file from all devices by deleting the placeholder is one of the desired features.
Would it be possible to implement this in the REST API with an endpoint like POST /rest/db/delete taking folder and file parameters?