How do I set up a watch folder?

If you want to upload files from a folder on your computer to your MediaLab environment, there are several ways to do this. This article introduces some of the ways you can set up a watch folder for uploading. Feel free to choose the option that best suits your specific situation.

Using the MediaLab Connect desktop app

If your computer's operating system is Windows, macOS or Linux, you can install our desktop app. This app has the ability to upload files from your watch folder. Follow the steps below after setting up your account.

Steps

  1. Open "Settings"
  2. Go to "Watch folder" tab
  3. Here we configure a number of things:
    • The local watch folder containing the files we want to upload
    • The archive folder, where files will go after uploading (optional)
    • The MediaLab folder we want to upload files to
  4. Activate the watch folder

Using a shell script (bash)

MediaLab has a shell script that uses few dependencies to upload to MediaLab such that this script can even work in more restricted environments, for example on your network attached storage device (NAS). If you have bash, cURL and python3 this script will work for you. To set up, follow the steps below.

  • Generate Private Token in MediaLab > Preferences > API Access
  • Copy medialab.env.example to medialab.env
  • Set Private Token and Lab URL in medialab.env
  • Set up watch dir structure (see README.md in link above)
  • Set up cronjob or scheduled task to execute this script periodically

Using a shell script (Windows PowerShell)

MediaLab provides a PowerShell script that can be used to upload to the FTP server of your MediaLab environment. To set up, follow the steps below.

  • Add FTP upload profile in MediaLab > Settings > FTP upload
  • Fill in the location of your MediaLab FTP server in the PowerShell script
  • Add your FTP username and password to the script
  • Set up cronjob or scheduled task to execute this script periodically

Using the pull add-on

The pull add-on allows you to create watch folders with cloud storage like S3 buckets or Azure storage containers. For more information on how to set it up, see our support article on this topic.