Multiple custom content storages

Hi,
I am having challenges with solving the following scenario:
I am creating flowable tasks when an email comes in. Via an IMAP connector, we read the emails and create tasks based on the emails.
The attachments of the emails are currently stored in a folder located on the server.
The tasks go into a process with multiple steps, in one step the files of the tasks are copied to a different location on a file share. I want to remove the files on the server, to reduce the disk storage.

I tried implementing the ContentStorage interface but I cannot figure it out. Content Object Storage customization | Flowable Enterprise Documentation.
This would work if I have only 1 location where I store the files.

I think this would be the solution: Have 2 contentstorage classes, 1 is pointing to the local file system. The other is pointing to the fileshare.
Based on one of the variables, I know if the files have been copied already. If that variable has the correct value, I want to retrieve the files from the filesshare. Else, I want to get them from the local filesystem.

How can I achieve this? I think the main problem is that in the ContentStorage, I don’t have access to the related task and variables to make the correct if statement.

Can someone help me with this?

Thank in advance!
Peter