Skip to content

Commit

Permalink
Encode filename in downloadFromNode and downloadFromTask methods (#2862)
Browse files Browse the repository at this point in the history
Co-authored-by: hoppe <[email protected]>
  • Loading branch information
wanghoppe and hoppe authored Dec 21, 2023
1 parent ac92a74 commit 140c958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions desktop/src/app/services/azure-batch/file/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,12 @@ export class FileService {
}

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

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

}
Expand Down

0 comments on commit 140c958

Please sign in to comment.