Skip to content

Commit 140c958

Browse files
wanghoppehoppe
andauthored
Encode filename in downloadFromNode and downloadFromTask methods (#2862)
Co-authored-by: hoppe <hoppewang@microsoft.com>
1 parent ac92a74 commit 140c958

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

desktop/src/app/services/azure-batch/file/file.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,12 @@ export class FileService {
246246
}
247247

248248
public downloadFromNode(poolId: string, nodeId: string, filename: string, dest: string) {
249+
filename = encodeURIComponent(filename);
249250
return this._download(`/pools/${poolId}/nodes/${nodeId}/files/${filename}`, dest);
250251
}
251252

252253
public downloadFromTask(jobId: string, taskId: string, filename: string, dest: string) {
254+
filename = encodeURIComponent(filename);
253255
return this._download(`/jobs/${jobId}/tasks/${taskId}/files/${filename}`, dest);
254256

255257
}

0 commit comments

Comments
 (0)