Skip to content

Commit

Permalink
Fix path (#75)
Browse files Browse the repository at this point in the history
* Fix path

Maybe fix for #65

* Ensure dir

* Update Controller.tsx
  • Loading branch information
htotoo authored Nov 7, 2024
1 parent 36d4569 commit 12e0b4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Controller/Controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ const Controller = () => {
) => {
const fileList = event.target.files;
if (!fileList) return;

let file = fileList[0];
let reader = new FileReader();

reader.onloadend = async () => {
await write(`mkdir /FIRMWARE`, false, true);
const arrayBuffer = reader.result;
if (arrayBuffer instanceof ArrayBuffer) {
let bytes = new Uint8Array(arrayBuffer);
Expand Down Expand Up @@ -641,7 +641,7 @@ const Controller = () => {
<button
disabled={disableTransmitAction}
onClick={() => {
setSelectedUploadFolder("/FIRMWARE");
setSelectedUploadFolder("/FIRMWARE/");
firmwareFileInputRef.current?.click();
}}
className="rounded bg-blue-400 p-2 text-white disabled:opacity-50"
Expand Down

0 comments on commit 12e0b4d

Please sign in to comment.