in internal/app/adapters/inbound/file/file_inbound.go [267:284]
func (f *FileInboundEndpoint) handleFileAction(fileURI, actionType string) error {
slog.Info("handling file action")
titleCaser := cases.Title(language.English)
actionKey := fmt.Sprintf("transport.vfs.ActionAfter%s", titleCaser.String(actionType))
if action, exists := f.config.Parameters[actionKey]; exists {
slog.Info(action)
if action == "MOVE" {
movePathKey := fmt.Sprintf("transport.vfs.MoveAfter%s", titleCaser.String(actionType))
movePath, exists := f.config.Parameters[movePathKey]
if !exists || movePath == "" {
return fmt.Errorf("move path not specified for %s action", actionType)
}
return f.protocolHandler.MoveFile(fileURI, movePath)
}
}
// Default to DELETE as per specification
return f.protocolHandler.DeleteFile(fileURI)
}