Capture the download url

My app runs an analysis and produces a file. I can create a download button that will allow the users to download the file. I want to pass this file on to a different, external API that needs a URL to this file. Is there a way to get this information?