Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

refactor: drop the upload comments that restate the endpoint docs and the line below them (PIN-132)

Luigi Agosti38f78e1d919d
diff --git a/internal/cli/actions/actions_upload.go b/internal/cli/actions/actions_upload.go
index bb89823e..316e4ff4 100644
--- a/internal/cli/actions/actions_upload.go
+++ b/internal/cli/actions/actions_upload.go
@@ -23,10 +23,6 @@ func Upload(client *http.Client, base, token string, args []string, selector, ta
cli.Fatal("Failed to read %s: %v", path, err)
}
files = append(files, base64.StdEncoding.EncodeToString(data))
- // The page reads file.name from the name the server stages under, so the
- // name the user typed has to travel with the bytes. Without it every
- // upload arrives as upload-<i>.bin and any form gating on the extension
- // rejects it — and the CLI is holding the real name right here.
fileNames = append(fileNames, filepath.Base(path))
}
diff --git a/internal/handlers/upload.go b/internal/handlers/upload.go
index fb784a23..0ac4d738 100644
--- a/internal/handlers/upload.go
+++ b/internal/handlers/upload.go
@@ -18,12 +18,8 @@ import (
)
type uploadRequest struct {
- Selector string `json:"selector"`
- Files []string `json:"files"`
- // FileNames names the entries of Files by index, so a page sees the file
- // the caller actually sent rather than a synthetic one. Optional and
- // index-aligned: a short or absent list leaves the remaining files on the
- // content-sniffed name, which is all a caller posting bare blobs can offer.
+ Selector string `json:"selector"`
+ Files []string `json:"files"`
FileNames []string `json:"fileNames"`
Paths []string `json:"paths"`
}