Skip to content

Commit aadb6f5

Browse files
committed
fix: downloads now work irrelevant of connected printer port
1 parent c9c5d63 commit aadb6f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/mixins/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ export default class UtilsMixin extends Vue {
197197

198198
download (file: string, path: string) {
199199
const filename = file || ''
200-
this.getFile(`/server/files/${path}/${file}`, { responseType: 'blob' })
200+
const filepath = (path) ? `/server/files/${path}/${file}` : `/server/files/${file}`
201+
this.getFile(filepath, { responseType: 'blob' })
201202
.then((response: AxiosResponse) => {
202203
const url = window.URL.createObjectURL(new Blob([response.data]))
203204
const link = document.createElement('a')

0 commit comments

Comments
 (0)