You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
All: Allow attaching files of unknown mime type
This commit is contained in:
@ -35,4 +35,9 @@ function isHidden(path) {
|
||||
return b[0] === '.';
|
||||
}
|
||||
|
||||
module.exports = { basename, dirname, filename, isHidden, fileExtension };
|
||||
function safeFileExtension(e) {
|
||||
if (!e || !e.replace) return '';
|
||||
return e.replace(/[^a-zA-Z0-9]/g, '')
|
||||
}
|
||||
|
||||
module.exports = { basename, dirname, filename, isHidden, fileExtension, safeFileExtension };
|
Reference in New Issue
Block a user