For the complete documentation index, see llms.txt. This page is also available as Markdown.

export_transport

The export_transport callback — deliver a finished export with a plugin. Transports on the export, the payload with decrypted options, the response, and events.

An export_transport callback delivers a finished export — to an FTP server, a WebDAV share, an external API, wherever. Transports run after the export (and a possible export callback) have finished, once per configured transport.

Transports on the export

Transports are part of the export definition, submitted in its _transports array:

{
  "export": {
    "name": "delivery",
    "_transports": [
      {
        "plugin": "fylr_example:copy_file",
        "options": { "url": "https://target.example.com/inbox", "pw:secret": "" }
      }
    ]
  }
}
Field
Description

plugin

"<plugin-name>:<procedure>" — an entry under callbacks.export_transport in the manifest. Empty for a plain download transport (no plugin runs).

options

Free-form configuration for the transport. Stored encrypted; keys prefixed pw: are treated as secrets.

email

Optional — fylr sends a notification mail after the transport.

The manifest side:

callbacks:
  export_transport:
    copy_file:
      exec:
        timeoutSec: 60
        service: "node"
        commands:
          - prog: "node"
            stdin:  { type: body }
            stdout: { type: body }
            args:
              - { type: "value", value: "%_exec.pluginDir%/server/export_transport/copy_file.js" }

The payload

The transport plugin receives the same payload as an export plugin, plus the transport:

Property
Description

all properties from export

Including the export object — on STDIN as { "export": … } when the command declares stdin: { type: body }, otherwise inside %info.json%.

transport

The transport object, with options decrypted — including pw:-prefixed secrets.

The response

The transport reports whether it succeeded and may add log lines to the event fylr writes; nothing else is read back:

Property
Description

_state

Requireddone, done_with_warnings or failed.

_transport_log

[]string, merged into the transport event.

A failed transport does not abort the export — the export itself degrades to done_with_warnings, and fylr writes an EXPORT_TRANSPORT_FAILED event (successful transports write EXPORT_TRANSPORT_FINISH), each carrying the _transport_log — see the event type reference.

Example

Send the export's files to the URL configured in the transport options:

The full implementation ships with the fylr example plugin (callbacks.export_transport.copy_file).

See also

Last updated