소스 검색

adhere url prefix with ui.download

Rodja Trappe 1 년 전
부모
커밋
2958546c14
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);