prevent fileSelector from overwriting name param

This commit is contained in:
jessop 2019-12-20 11:44:52 -05:00 committed by Sean Yesmunt
parent a43d91504f
commit 4871973f88
2 changed files with 2 additions and 2 deletions

View file

@ -937,4 +937,4 @@
"Rewards Disabled": "Rewards Disabled",
"Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!.": "Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!.",
"Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%.": "Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%."
}
}

View file

@ -53,7 +53,7 @@ function PublishFile(props: Props) {
filePath: file.path || file,
};
// Strip off extention and replace invalid characters
let fileName = file.name.substr(0, file.name.lastIndexOf('.')) || file.name;
let fileName = name || file.name.substr(0, file.name.lastIndexOf('.')) || file.name;
let INVALID_URI_CHARS = new RegExp(regexInvalidURI, 'gu');
let parsedFileName = fileName.replace(INVALID_URI_CHARS, '-');
if (!isStillEditing) {