mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Fixed determining file extension. (#6111)
This commit is contained in:
parent
771e5c867e
commit
1a61994c61
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ const doImport = async (req, res, padId, authorId) => {
|
|||
|
||||
// ensure this is a file ending we know, else we change the file ending to .txt
|
||||
// this allows us to accept source code files like .c or .java
|
||||
const fileEnding = path.extname(srcFile).toLowerCase();
|
||||
const fileEnding = path.extname(files.file[0].originalFilename).toLowerCase();
|
||||
const knownFileEndings =
|
||||
['.txt', '.doc', '.docx', '.pdf', '.odt', '.html', '.htm', '.etherpad', '.rtf'];
|
||||
const fileEndingUnknown = (knownFileEndings.indexOf(fileEnding) < 0);
|
||||
|
|
Loading…
Reference in a new issue