Add file upload functionality to the agent. Implement API endpoint for uploading files, including validation and error handling. Update web interface to support file selection and display upload status. Enhance input handling with configurable key delay for text input.

This commit is contained in:
2026-08-28 12:52:26 +03:00
parent d7274f34e0
commit fe560c6a65
16 changed files with 408 additions and 24 deletions
+11 -9
View File
@@ -2,8 +2,6 @@ package startup
import (
"errors"
"os"
"path/filepath"
"golang.org/x/sys/windows/registry"
@@ -21,7 +19,7 @@ func Enabled() bool {
}
func Enable() error {
command, err := commandLine()
command, err := installedCommandLine()
if err != nil {
return err
}
@@ -33,6 +31,14 @@ func Enable() error {
return k.SetStringValue(config.StartupValueName, command)
}
// SyncInstalledPath rewrites an existing Run entry to the AppData install path.
func SyncInstalledPath() error {
if !Enabled() {
return nil
}
return Enable()
}
func Disable() error {
k, err := registry.OpenKey(registry.CURRENT_USER, config.StartupRunKey, registry.SET_VALUE)
if err != nil {
@@ -49,12 +55,8 @@ func Disable() error {
return err
}
func commandLine() (string, error) {
exe, err := os.Executable()
if err != nil {
return "", err
}
exe, err = filepath.Abs(exe)
func installedCommandLine() (string, error) {
exe, err := config.InstalledExe()
if err != nil {
return "", err
}