Problem creating a WebServer

134 views
Skip to first unread message

Caiota

unread,
Mar 21, 2024, 6:06:34 AM3/21/24
to DroidScript
I'm trying to create a WebServer, like this:

   serv = app.CreateWebServer( 8080, "Upload" );
serv.SetFolder( "/Internal/Wifi Transfer");
serv.AddServlet( "/message", OnServlet );
serv.Start();

but when I enter the url

http://192.168.0.40:8080/index.html (WHICH EXISTS!)

the page returns error 500. What could it be?

Dave

unread,
Mar 27, 2024, 2:13:30 PM3/27/24
to DroidScript
If you are on 'scoped storage' Android 10+ then you will need to use /Storage/Wifi Transfer instead because the folder you are using will not be accessible by default unless you get the user to allow access to it using a technique similar to the 'Storage Access' sample.
Reply all
Reply to author
Forward
0 new messages