File attachment for alarms

I've been trying to implement a feature where you can attach pdf files to alarms, similar to how alarms have notes. I have tried to use custom alarm properties like AssociatedData, but i can't upload files.

AssociatedData associatedData = new AssociatedData("My data", FileHandler.class);

Is there a way to implement this feature? How would I go about?