@@ -83,3 +83,44 @@ An invocation via a button in javascript could look like:
...
@@ -83,3 +83,44 @@ An invocation via a button in javascript could look like:
For more information see the :doc:`specification of the API <../specification/Server-side-scripting>`
For more information see the :doc:`specification of the API <../specification/Server-side-scripting>`
Calling from the webui
---------------------
Refer to `webui documentation <https://docs.indiscale.com//caosdb-webui/extension/forms.html#calling-a-server-side-script>`__ to learn how to setup the webui side of this interaction.
The following example assumes that the form in the webui has only one filed
which is a file upload with the name ``csvfile``.
.. code-block:: python
import os
import linkahead as db
from caosadvancedtools.serverside import helper
from caosadvancedtools.serverside.logging import configure_server_side_logging