aseba icon indicating copy to clipboard operation
aseba copied to clipboard

Serving local files from Thymio Device Manager

Open MobsyaBot opened this issue 6 years ago • 5 comments

Issue by ypiguet-epfl Monday Jun 19, 2017 at 14:49 GMT Originally opened as https://github.com/aseba-community/aseba/issues/642


Suggestion: add support to asebahttp and asebahttp2 to also serve local files, to avoid cross-origin issues. A basic implementation with a single directory and a few mime types (html, js, css, png, jpg) would already be very useful.

MobsyaBot avatar Apr 17 '18 16:04 MobsyaBot

Comment by stephanemagnenat Monday Jun 19, 2017 at 19:30 GMT


Agreed, it makes sense.

MobsyaBot avatar Apr 17 '18 16:04 MobsyaBot

Comment by davidjsherman Monday Jun 19, 2017 at 20:52 GMT


I'm not sure I understand. Could you describe a test that would demonstrate this? Some URIs and their expected results would help.

There is already a plan to serve the OAS apidoc and the thymio-motion.aesl file, I am guessing that this a more general service?

MobsyaBot avatar Apr 17 '18 16:04 MobsyaBot

Comment by ypiguet-epfl Thursday Jun 22, 2017 at 07:02 GMT


David, I'm thinking about web applications. Browsers usually restrict cross-origin requests with XMLHttpRequest (as I understand it, currently asebahttp2 is completely open with Access-Control-Allow-Origin: *). Another advantage is to avoid separate http servers or reverse proxys.

I'm not aware of development plans. Is there any link you can share?

MobsyaBot avatar Apr 17 '18 16:04 MobsyaBot

Comment by davidjsherman Thursday Jun 22, 2017 at 08:13 GMT


I don't have my notes on the single-page app at the office, but can dig them up. They would be PDFs extracted from my livescribe. I am sure that they weren't made public in GitHub. Plans for a single-page app drove the definition of the new asebahttp API.

Historically the CORS modification in asebahttp was made in f45c83c038e03fe99a98a8b46e76eaeed2493bf1 in response to a discussion with Pierre Rouanet, but there was no issue opened for it. About that time there was a discussion about embedding the thymio_motion.aesl file in a firmware version of asebahttp. In part to avoid cross-origin but also to permit the Thymio to act as a wireless AP.

MobsyaBot avatar Apr 17 '18 16:04 MobsyaBot

I suggest that the TDM can also put in the network file (improve .aesl) so that people can share code, share configuration, share exercice. It could be the way to make the "teachers tool".

mbonani avatar Aug 23 '18 08:08 mbonani