#2258·sftpgo

Expose target mount information in hook payload

Author: smilingthaxCreated Jul 3, 2026Updated Jul 7, 2026
Labelssuggestion

Is your feature request related to a problem? Please describe.

When using sftpgo.json hook like

"common": {
  "actions": {
    "execute_on": ["uploads", "delete", "copy", "rename"],
    "execute_sync": [],
    "hook": "http://..."
  }
}

the actions copy and rename not only have virtual_path but also virtual_target_path in the hook payload.

Unfortunately, the (e.g.) fs_type, bucket and endpoint (for s3 / fs_type=1) fields only cover the source virtual path ("mount"), and do not even allow detecting cross-"mount" operations.

Describe the solution you'd like

Together with the existing path (source, or when the action only references a single "path") -> target_path (destination, when the action actually affects two "paths") and virtual_path -> virtual_target_path,
extend to payload to also include target_fs_provider, target_bucket, and target_endpoint (analogous to fs_provider, bucket, endpoint).

Describe alternatives you've considered

On every hook execution, use api-key to call back to sftpgo api to determine the full virtual_path information of the target (/ destination) for the triggering user.

What are you using SFTPGo for?

Medium business

Additional context

We might be able to provide a pull request, if it helps.