Adding Primary attachment actions to an object
In the action model xml file that defines the action model with the menufor attribute for your object type add the following actions. This will provide download or url redirect actions depending on if the object has a primary file or url.
<action name="download_primary_attachment"
type="attachments"/>
<action name="redirect_primary_attachment"
type="attachments"/>
<action name="checkout_and_download" type="wip"/>
<action name="replace_content" type="wip"/>