prevent fileSelector from overwriting name param
This commit is contained in:
parent
a43d91504f
commit
4871973f88
2 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ function PublishFile(props: Props) {
|
||||||
filePath: file.path || file,
|
filePath: file.path || file,
|
||||||
};
|
};
|
||||||
// Strip off extention and replace invalid characters
|
// 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 INVALID_URI_CHARS = new RegExp(regexInvalidURI, 'gu');
|
||||||
let parsedFileName = fileName.replace(INVALID_URI_CHARS, '-');
|
let parsedFileName = fileName.replace(INVALID_URI_CHARS, '-');
|
||||||
if (!isStillEditing) {
|
if (!isStillEditing) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue