fix broken file renaming for file names with dot

remove grouping in regex
This commit is contained in:
Sendil Kumar
2018-08-28 22:49:37 +02:00
parent e3b1b08424
commit a8db2b30f2

View File

@@ -107,7 +107,7 @@ async function compressImage(
return new File(
[compressedData],
sourceFilename.replace(/\..+$/, '.' + encoder.extension),
sourceFilename.replace(/.[^.]*$/, `.${encoder.extension}`),
{ type: encoder.mimeType },
);
}