Skip to content

How to customize: upload files

Helmut Wolman edited this page Dec 13, 2021 · 5 revisions

If you just have a static file, you can place the csv to the server just by ftp-upload.

Install Syncthing

But if you have many csv-files from all your users, which they should be able to update frequently, then the best way of placing the csv file under your domain is by installing Syncthing on your server. This tool can syncronize any local folder to your server. And if you select a local Nextcloud-folder, you can share the access to the folder, or their subfolders, to your clients, so they can edit their csv files autonomously any time, and it gets updated, as long as your local computer with the syncthing installed is running.

Configure Syncthing

Your syncthing on the server should be configured, to accept all folder-invitations automatically.

  1. Go to the settings of you own device (top right corner 'Actions') and select under 'Edit Folder Defaults' the 'Folder Path' to '/public/' on the domain it is hosted.
  2. Pair the online-Syncthing on your Server with your local Syncthing on your laptop by clicking '+ Add Remote Device' on one side and accept it on the other
  3. Activate 'Auto-Accept' on the online-Syncthing for your local device by selecting the local Device under "Remote Devices" and click on 'Edit'. Under "Sharing" you can activate 'Auto Accept'.

No you can choose any local folder or subfolder, even one that is laying inside a local nextcloud, and share it with the online-syncthing to place your folder on your server in the '/public/' folder.

Limit the uploaded files by ingore-patterns

In case you give your clients access to certain nextcloud-folders, which than are synced to the online-path, you might want to make sure, that it does not syncronize wrong or prive files unintentionally. This can be done by setting up ignore patterns for all files, except those, which are really needed.

  1. Select the folder you are sharing on your local syncthing and click on 'edit' to navigate to the 'Ignore Patterns' section.
  2. There you can add the following pattern:

!/*/filters/categories.csv

!/*/filters/regions.csv

The first lines is an inversion, saying, you should syncronize it. The third line is a wildcard saying "do not syncronize anything in this folder"