The user needs to be able to upload a bunch of images which my app will merge into a single PDF. Then the user needs to be able to save that PDF to their local machine. My Blazor C# application uses <InputFile...> to prompt the user to select one or more images from their local machine. The app then creates the PDF file and adds the images to it. I need a way for the user to specify where they want to save the PDF. Or, failing that, I need a way to save it to a pre-determined folder (the application folder or whatever) and a fixed name (such as mergedImages.pdf) and then open the saved file in a browser window from which the user can download it to wherever they want.
I've tried adding a button with an href that points to the downloaded file, but the browser always blocks the link, returning the error: "Not allowed to load local resource: file:///D:/IVG_Blazor/MergeImagesIntoPDF/mergedImages.pdf".
Another way I thought of was to have it write the PDF to the downloads folder and display an icon at the bottom of the page that gives the user the options "Open", "Always open files of this type", "Show in folder", "Cancel". But I don't know how to implement that.
Does anyone know how to give the user easy access to such a file? Thanks.