extname should support uppercase (#569)
This commit is contained in:
@@ -269,7 +269,7 @@ export class Audio extends Model<Audio> {
|
||||
}
|
||||
|
||||
// Check if file format is supported
|
||||
const extname = path.extname(filePath);
|
||||
const extname = path.extname(filePath).toLocaleLowerCase();
|
||||
if (VideoFormats.includes(extname.split(".").pop() as string)) {
|
||||
return Video.buildFromLocalFile(filePath, params);
|
||||
} else if (!AudioFormats.includes(extname.split(".").pop() as string)) {
|
||||
|
||||
@@ -285,7 +285,7 @@ export class Video extends Model<Video> {
|
||||
}
|
||||
|
||||
// Check if file format is supported
|
||||
const extname = path.extname(filePath);
|
||||
const extname = path.extname(filePath).toLocaleLowerCase();
|
||||
if (AudioFormats.includes(extname.split(".").pop() as string)) {
|
||||
return Audio.buildFromLocalFile(filePath, params);
|
||||
} else if (!VideoFormats.includes(extname.split(".").pop() as string)) {
|
||||
|
||||
Reference in New Issue
Block a user