Skip to content

Commit ce747e1

Browse files
committed
Supports both uf2.bin and general *.uf2
`idf.py` generates uf2.bin, while the standard extension should be .uf2
1 parent 1e8a7f9 commit ce747e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import ESPTool from '@/esptool';
3737
import type { IState } from '@/types/state';
3838
import type { IESPDevice, IFlashProgress } from '@/esptool';
3939
40-
const ACCEPT_EXTS = ['.zip', '.bin'];
40+
const ACCEPT_EXTS = ['.zip', '.bin', '.uf2'];
4141
4242
const MAX_FILE_SIZE = 16 * 1024 * 1024;
4343
@@ -86,7 +86,7 @@ async function handleFile(file: File): Promise<void> {
8686
const name = file.name.toLocaleLowerCase();
8787
if (name.endsWith('.zip')) {
8888
state.flashArgs = await readZip(file);
89-
} else if (name.endsWith('.bin')) {
89+
} else if (name.endsWith('.uf2') || name == 'uf2.bin') {
9090
state.flashArgs = await readUf2(file);
9191
}
9292

0 commit comments

Comments
 (0)