activeCollab API: Post multiple files

I'm using a self hosted activeCollab 5 setup and am trying to upload multiple files via /upload-files. I am sending a multipart form POST with each part name named "attachment_1", "attachment_2" and so on. Unfortunately only the first file in my request named attachment_1 is beeing used and returns the file code response.

What is the correct way to upload multiple files through the API (without the SDK - our application is using Ruby ond Rails) at once?