I am working on an ASP.NET Core web app and I'm using Razor Pages.
I have some URLs displayed in my app and when I click on one of them, I want to download the file corresponding to that URL on a folder on the server where the application is stored, not on the client.
This is important because the file needs to be processed server-side by some other third-party applications.
The URLs along with other metadata are coming from a database and I created a DB context to load them. I made a CSS HTML file and displayed the information in a form. When I click on a button, I post the URL to a method handler.
I receive the URL in the method but I don't know how to download that file on the server without downloading it first on the client and then saving/uploading it to the server. How can I achieve this?