I have to second what @esbeeb stated that Syncthing is the way to go for this task. I use it for synchronizing pictures between my mobile and my Desktop Linux machines. I have been using it regularly for years and much prefer it to the Google Drive equivalents. I have my phone paired with 3 different machines directly to ensure that there is always a machine available to dump the pictures.
I also have a sync folder that I keep documents I want to be able to view on my phone or my computer. This works fantastically well too. Though, I can say, as of recent, I don’t use it much on the phone as I do on a tablet.