Procházet zdrojové kódy

adhere url prefix with ui.download

Rodja Trappe před 1 rokem
rodič
revize
2958546c14
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      nicegui/templates/index.html

+ 1 - 1
nicegui/templates/index.html

@@ -214,7 +214,7 @@
 
       function download(src, filename) {
         const anchor = document.createElement("a");
-        anchor.href = typeof src === "string" ? src : URL.createObjectURL(new Blob([src]));
+        anchor.href = typeof src === "string" ? "{{ prefix | safe }}" + src : URL.createObjectURL(new Blob([src]));
         anchor.target = "_blank";
         anchor.download = filename || "";
         document.body.appendChild(anchor);