fix(image): fix image download on Windows

Fixes #8755
This commit is contained in:
Jonathan Rainville 2022-12-20 15:48:15 -05:00
parent fb254fd775
commit f29210d4a2
2 changed files with 5 additions and 2 deletions

View File

@ -115,7 +115,8 @@ QtObject:
downloadImage(content, path)
proc downloadImageByUrl*(self: Utils, url: string, path: string) {.slot.} =
downloadImageByUrl(url, path)
let pathFormatted = self.formatImagePath(path)
downloadImageByUrl(url, pathFormatted)
proc generateQRCodeSVG*(self: Utils, text: string, border: int = 0): string =
var qr0: array[0..qrcodegen_BUFFER_LEN_MAX, uint8]

View File

@ -470,10 +470,12 @@ StatusMenu {
id: fileDialog
title: qsTr("Please choose a directory")
selectFolder: true
selectExisting : true
selectMultiple: false
modality: Qt.NonModal
onAccepted: {
if (root.imageSource) {
root.store.downloadImageByUrl(root.imageSource, fileDialog.fileUrls)
root.store.downloadImageByUrl(root.imageSource, fileDialog.fileUrl)
}
fileDialog.close()
}