LearnNewsExamplesServices
Frontmatter
titleFile upload
authorExtAnimal
stateClosed
createdAtAug 11, 2023, 6:09 PM
updatedAtAug 16, 2023, 9:42 AM
closedAtAug 15, 2023, 9:49 AM
mergedAt
branchesdevfile-upload
urlhttps://github.com/neomjs/neo/pull/4703
Closed
ExtAnimal
ExtAnimal commented on Aug 11, 2023, 6:09 PM
tobiu
tobiu commented on Aug 11, 2023, 10:21 PM

Hi Nige,

looks very nice so far. The only thing I am wondering about: do we really want to push the cors dependency into the repo? Not really needed there. Also, the app.js file on top level. Guess we could move that one into the example folder and maybe rename it into server (with a comment that it requires express & cors). Thoughts?


ExtAnimal
ExtAnimal commented on Aug 13, 2023, 4:40 PM

That's why this is a Draft PR. I'm not suggesting that stuff be kept in.

It's for discussion and the sharing of code at this stage.

We will have to work out a testing strategy separately. The sequences of interactions and the states cycled through are complex, so it will need a test, and that will need some HTTP server which will produce known results in a similar way to that little Express server.

This is the example page, which by going to server endpoints with known responses, exercises all the states. The example may finish with the four possible stable states when a file is selected in each one.

  • Successful upload and scan and downloadable
  • Successful upload and scan and not downloadable
  • Failed upload
  • Failed malware scan

From these states, clicking that action icon will reset the widget to its ready state.

Screenshot 2023-08-13 at 16 36 44

tobiu
tobiu commented on Aug 15, 2023, 9:49 AM

closing the draft PR & creating a real one