File Download widget from base64 string for web

hello, I developed a widget for file download using the base64 string for the web, It works fine on the web. I have to use that in Web view. In my native project, I am having a screen with a web view. In that web view, the web screen will be mapped. I have developed the widget where an image will be there by clicking it, and the pdf file will be downloaded. the widget is in the web screen.   My widget code is: export function HelloWorldSample({ base64string, filelogo, fileName }: HelloWorldSampleProps): ReactElement {     const handleLogoClick = () => {         try {             const pdf = {                 file: `data:application/pdf;base64,${base64string.value}`,                 file_name: fileName.value             };             downloadPDF(pdf);         } catch (error) {             console.warn("Error while download", error);         }     };     const checkonclicjk = () => {         console.warn("Clicked");     };     return (         <div className="widget-hello-world">             <img src={filelogo?.value?.uri || ""} alt="Logo" onClick={handleLogoClick} />             <button onClick={checkonclicjk}>Im a button</button>         </div>     ); } function downloadPDF(pdf: any): void {     try {         const pdfLink = `${pdf.file}`;         const anchorElement = document.createElement("a");         const fileName = `${pdf.file_name}.pdf`;         anchorElement.href = pdfLink; = fileName;;         console.warn("pdflink", pdfLink);         console.warn("anchorelement", anchorElement);         console.warn("fileName", fileName);     } catch (error) {         console.warn("Error", error);     } }   I tried to check the log from Mendix cloud and it shows the file is downloaded but I am not able to see the file in my mobile under downloads.   it doesn't throws any error
0 answers