fix(download) download files with "#" in name (#80)

This commit is contained in:
Matt Hoover 2018-04-16 16:15:58 -04:00 committed by coderaiser
parent fb79abcab7
commit 2008f55166

View file

@ -309,16 +309,15 @@ function MenuProto(Position) {
files.forEach((file) => {
const selected = DOM.isSelected(file);
const isDir = DOM.isCurrentIsDir(file);
const path = DOM.getCurrentPath(file);
CloudCmd.log('downloading file ' + path + '...');
/*
* if we send ajax request -
* no need in hash so we escape #
* and all other characters, like "%"
*/
const path = DOM.getCurrentPath(file)
.replace(/#/g, '%23');
CloudCmd.log('downloading file ' + path + '...');
const encodedPath = encodeURI(path);
const encodedPath = encodeURI(path).replace(/#/g, '%23');
const id = load.getIdBySrc(path);
let src;