api: return correct extension for gif downloads in api response
This commit is contained in:
@@ -65,3 +65,14 @@ export function merge(a, b) {
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
export function splitFilenameExtension(filename) {
|
||||
const parts = filename.split('.');
|
||||
const ext = parts.pop();
|
||||
|
||||
if (!parts.length) {
|
||||
return [ ext, "" ]
|
||||
} else {
|
||||
return [ parts.join('.'), ext ]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user