Skip to content

Conversation

@kidneyhex
Copy link

Link: https://kidneyhex.github.io/EspruinoWebIDE/

An updated file upload. Just providing to save you time, if it helps. Take as much or none of it as you'd like. :)

  • Single files act the same as before.
  • Multiple files give a window listing them all with rename options.
  • Image/audio files get a "Convert" button that's required before upload. They show "pending" in red until the conversion has been set up, then "ready" in green.
  • Multiple files with the same "target name" give an error about the duplicate name.

(No special logic for metadata.json or apps, just the existing image/audio conversion.)

Multi-file popup

The status window is a little weird. The first file has a normal message and progress bar, then each file after that ends up getting its status messed up by the previous file's "Sent" status.

@gfwilliams
Copy link
Member

Ok, thanks! there are some massive changes here though - I'll have to wait until the new year before I can really look at them - and also test to make sure they still work ok on SD cards.

It would be good if you could try and look into the status issue - I don't feel great about merging something that we actually know has issues - especially as it could be trying to send over a new file while the last one is in progress.

I did take a quick look at the code though and it looks ok - maybe changing uploadNext(); to be setTimeout(uploadNext, 0); is enough if it's not a deeper issue?

One thing I did spot - it looks like maybe if you upload a wav/image/etc file it actually forces you to convert it before it'll upload? Previously you could upload a file without having to convert it - and there are cases (like developing for the Pip-boy) where you'd want to be able to upload a Wav file without conversion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants