fix(backup.fetchFiles): encode URI suffix

Fix issue with whitespaces in the filename.
This commit is contained in:
Julien Fontanet 2016-12-20 17:07:03 +01:00
parent 58334bf4a1
commit 8827f8e940

View File

@ -54,7 +54,7 @@ function handleFetchFiles (req, res, { remote, disk, partition, paths }) {
export async function fetchFiles (params) {
return this.registerHttpRequest(handleFetchFiles, params, {
suffix: `/${basename(params.paths[0])}`
suffix: encodeURI(`/${basename(params.paths[0])}`)
}).then(url => ({ $getFrom: url }))
}