-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add HTTP Server to Online Medley docker image; serves files from MEDLEY_USERDIR/webfiles; #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…hich will be loaded and run when Online Medley starts up - accessible only via the online.interlisp.org/guest scheme.
Signed-off-by: Frank Halasz <frank@halasz.org>
…ese start scripts
Signed-off-by: Frank Halasz <frank@halasz.org>
…rl if wget is not present; ShellHttpGet now resides in the file library/ONLINEUTILS (rather than library/UNIXUTILS) and is loaded only into the Online Medley docker image and not the standard Medley loadups
…he https server starts when Medley starts and feeds pages from MEDLEY_USERDIR/webfiles. Meant to allow Medley to open locally produced and stored html files in a web browser
…rather than the Dockerfile_medley since the file system is preserved across invocations and may have been created before the MEDLEY_WEBDIR facility came into being.
…n starting the Medley Online container
…stem in a browser via the OIO Https server. webfiles are stored in {WEBFILES}.
|
If I evaluate This happens on both Medley Online and the staging server. The file test.html does exist under webfiles. |
|
On Medley Online |
|
I don't know whether it's related, but pasting text with The current Medley Online sysout is dated 10-Dec-2025 01:25:45, so it may not have picked up the latest changes yet. |
|
@pamoroso - I think that needs a separate issue. Medley is passing "xclip -o -selection clipboard" to the shell, and xclip is responding with "Error: target STRING is not available", that gets stuffed into whatever Lisp window is active, and if that happens to be an exec, you get "Can't find package Error to look up symbol" because the input contained "Error:" and there is no such package. If you happen to paste it into a TEdit window you'd just see that string. Diagnosed by tracing IL:CREATE-PROCESS-STREAM and then executing the same command in a chat-to-shell window. Part of the problem is because the invocation of xclip does not distinguish between the desired output on stdout, and the error output on stderr, and doesn't alter its behavior based on whether the exit status is 0 (success) or 1 (failure). If you run it with |
|
Thanks, I opened issue #2416. |
|
For the WEBFILES URL issue - I'd bet it's because you're giving it ">" as the directory separator instead of "/", and the URL handling isn't doing the conversion. I think there should probably be an issue for either missing documentation or missing code. |
|
@pamoroso Online.WebfileURL takes only a file path for a file below {WEBFILES}. So the given path should never have a HOST component like {LI} or {WEBFILES}. And the path "webfiles>test.thml" refers to {WEBFILES}webfiles/test.html". The test.hmtl file is (should be) at {WEBFILES}test.html. I will update code to error out if given a path with a HOST component. Also I will fix the ">" to "/" issue. Are you sure there is no test.html in your setup if you |
|
|
|
|
|
@fghalasz I tried |
This PR adds a Python HTTP File server running in every invocation of Run Medley.
The HTTP Server for a specific Online Medley invocation can be accessed at https://online.interlisp.org:<WEBFILES_PORT>,
where <WEBFILES_PORT> can be found within the Medley run using
(UNIX-GETENV "OIO_WEBFILES_PORT")The HTTP Server serves files from MEDLEY_USERDIR/webfiles - within Medley this directory is PSEUDONAMEd
{WEBFILES}A webfile is any file stored in {WEBFILES} that can be accessed by a web browser.
The Medley function
(Online.WebfileURL WebfilePath)returns a URL that can be used to access the named webfile from any browser. The WebfilePath is just the portion of the path underneath {WEBFILES}.The Medley function
(Online.OpenWebfile WebfilePath)opens a new browser page showing the specified webfile.The intended use of the HTTP server is to allow Medley to display in a browser tab, either HTML or PDF files created by HARDCOPY functions.
This PR is currrently active on the dev system https://online.interlisp.org:8081