Browse Source

adhere url prefix with ui.download

Rodja Trappe 1 year ago
parent
commit
2958546c14
1 changed files with 1 additions and 1 deletions
  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);