Inline File Validation with Lua

For general information about inline file validation, see Inline File Validation (Overview)

The administrator defines a base-64 encoded Lua action script and a path to that script in the UI or in the <transfer> section of aspera.conf.

During the inline validation process, ascp automatically generates a request; the parameters for the Lua call are passed to a Lua script defined in aspera.conf.

The returned value from Lua indicates validation success or failure:

Lua Logging Facility

The Lua harness provides string access to the various ascp log interfaces (simple text string only; format strings are not supported).

The following ascp logging functions are supported:
  • as_err
  • as_log
  • as_dbg1
  • as_dbg2
  • as_dbg3
  • as_dbg4
To invoke the function, substitute lua for as in the code; for example, you could enter the following line in a Lua script for as_log:
lua_log("This was a successful transfer")
This would result in the following log entry:
xxxxxx LOG lua: This was a successful transfer