v0.6.9: drag-and-drop upload on share-upload pages (#194) #195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ship-v0.6.9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#194 — Drag-and-drop upload on the public share-upload page
The share-upload page is server-rendered by
internal/share/public.gorenderListing, which previously emitted only a file-picker<form>(no JS). This adds, whenAllowUploadis set, a drop zone and a small inline script that:location.pathname) — the same endpoint andfilefield the picker form already uses,Upload failed (<status>)otherwise.Uploads land flat in the shared directory, matching the existing form's behavior. Scoped to upload shares only; the password form and strong-share viewer are untouched.
Test:
TestShareUploadHasDropZone— anAllowUploaddir share's page contains the drop zone; a read-only share does not.Validation
One-shot workflow:
gofmt,node --checkon the extracted drop-handler JS,go vet ./...,go test ./...(all green, incl. the new test), dual-arch build.Closes #194.