更改下载方法名

This commit is contained in:
super
2026-04-06 22:26:44 +08:00
parent afffb7aad2
commit c9947c4ac8
17 changed files with 1419 additions and 724 deletions

View File

@@ -154,7 +154,7 @@ class WindowAPI:
)
return result[0] if result else ''
def save_file_from_url(self, url, default_filename='download.bin'):
def save_file_from_url_new(self, url, default_filename='download.bin'):
"""弹窗选择保存位置,从 url 下载文件并保存。根据文件后缀动态设置保存类型。"""
if not url or not url.strip():
return {'success': False, 'error': '下载地址为空'}
@@ -360,7 +360,7 @@ def main():
)
api = WindowAPI(window)
window.expose(api.close, api.minimize, api.maximize, api.toggle_maximize, generate_images, api.save_image, api.save_image_to_folder, api.select_folder, api.select_brand_xlsx_files, api.select_brand_folder,
api.save_file_from_url, api.save_template_xlsx,api.save_template_zip,api.upload_file_to_java,api.open_external_url,api.enqueue_json,api.get_detail_del)
api.save_file_from_url_new, api.save_template_xlsx,api.save_template_zip,api.upload_file_to_java,api.open_external_url,api.enqueue_json,api.get_detail_del)
webview.start(
debug=True,
storage_path=cache_path,