Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -21,11 +21,17 @@ async function blobToUint8Array(blob: Blob): Promise<Uint8Array> {
|
||||
return new Uint8Array(buffer);
|
||||
}
|
||||
|
||||
function guessFilters(filename: string, mimeType?: string): Array<{ name: string; extensions: string[] }> {
|
||||
function guessFilters(
|
||||
filename: string,
|
||||
mimeType?: string,
|
||||
): Array<{ name: string; extensions: string[] }> {
|
||||
const ext = filename.includes('.') ? filename.split('.').pop()!.toLowerCase() : '';
|
||||
const mime = (mimeType || '').toLowerCase();
|
||||
|
||||
if (mime.startsWith('image/') || ['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'svg'].includes(ext)) {
|
||||
if (
|
||||
mime.startsWith('image/') ||
|
||||
['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'svg'].includes(ext)
|
||||
) {
|
||||
return [
|
||||
{ name: 'Images', extensions: ['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'svg'] },
|
||||
{ name: 'All Files', extensions: ['*'] },
|
||||
|
||||
Reference in New Issue
Block a user