There’s no obvious way to download a file object that is in your code. The PTFP_FEED:UTILITY:Utility class has a very handy function for doing exactly this, viewStringAsAttachment.

import PTFP_FEED:UTILITY:Utility;
Local &Util = create PTFP_FEED:UTILITY:Utility();
&Util.viewStringAsAttachment(&YourFile.GetString(), _"downloadName.txt"_, false)