You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-20 23:30:05 +02:00
Clipper: Fixes #1600: Handle SVG images and fix issue with invalid file extensions
This commit is contained in:
@@ -30,4 +30,11 @@ netUtils.findAvailablePort = async (possiblePorts, extraRandomPortsToTry = 20) =
|
||||
return port;
|
||||
}
|
||||
|
||||
netUtils.mimeTypeFromHeaders = headers => {
|
||||
if (!headers || !headers['content-type']) return null;
|
||||
|
||||
const splitted = headers['content-type'].split(';');
|
||||
return splitted[0].trim().toLowerCase();
|
||||
}
|
||||
|
||||
module.exports = { netUtils };
|
||||
Reference in New Issue
Block a user