AFAIK, It is possible using Tasker.
The action File >> Share File states:
Share a file with another application or device.
If Mime Type is not specified, Tasker will attempt to deduce it.
If Show Chooser is specified, Android will display a selection of
possible ways of sharing the file, in a dialog.
If not specified, the chooser may be shown anyway if there is no known default way of handling that Mime Type.
Some Android versions may ignore Chooser Title.
Trigering the task gives the possible options of sharing the file. If I understand correctly what you are trying to achieve, I have added screenshots:
If your Tasker version doesn't have the File → Share share action, you can use the AutoShare plugin:
It lets you use the regular Android share menu and choose AutoShare from the list and the Subject, Text or files will be sent to Tasker where you can do what you want with them.
The developer (Joao) has also made various resources available to get you quickly going. And more here