Skip to content

feat(files): uploads that work on Windows, several files and zips, and error details (0.62.0) - #29

Merged
nodemode-ai merged 6 commits into
mainfrom
feat/uploads-0.62.0
Nov 29, 2026
Merged

nodemode-ai merged 6 commits into
mainfrom
feat/uploads-0.62.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Collaborator

feat(files): uploads that work on Windows, several files and zips, and error details (0.62.0)

Summary

  • Fixes the Reddit report: in the Windows desktop app every upload answered "Internal error.", a .png into a gallery's Files and media property among them. Cause: store in internal/files/files.go renamed the temporary upload while it was still open, and Windows refuses that rename (Go opens files there without FILE_SHARE_DELETE). The file is now closed before the rename, as backup, import and encrypt already did.
  • The desktop server now also writes warnings and errors to form-md.log in the data folder (~/form.md/form-md.log), with the run before it in form-md.log.1. Before, the app dropped the server's output once its window opened, so a 500 left nothing to read.
  • A 500 now carries data.request_id on every server. The desktop server alone also sends data.detail with the cause.
  • New POST /api/files/unzip: every PNG, JPEG, GIF and WebP inside an uploaded zip is stored as an attachment through store, judged by content. Other entries are listed as skipped with a reason. Reading is capped per entry, in total (4x the upload limit) and at 500 images.
  • Files and media picks several files at once and takes dropped files and zips. Files go one at a time under one counting toast and are added in one change. An error toast shows a ? that opens a centered What went wrong dialog with a Copy button. Cover, icon and avatar uploads get the same ?.

Commits

  • fix: close an upload before renaming it, so uploads work on Windows
  • feat: keep the desktop server's warnings and errors in form-md.log
  • feat: a 500 carries its request id, and in the desktop app its cause
  • feat: store every image inside an uploaded zip as an attachment
  • feat: several files and zips in Files and media, and error details
  • chore(release): v0.62.0 (0.62.0)

Short hashes change when the commits are signed, so they are left out.

Version

v0.62.0 (release commit is last). Bumped: Makefile, internal/app/version.go, web/package.json, web/package-lock.json (both fields), src-tauri/Cargo.toml, src-tauri/Cargo.lock, src-tauri/tauri.conf.json, README badge, .docs/wiki/Home.md and Releases.md, docs/EXTENSIONS.md, and the three HASHOUT_LOG.md headers. The release also carries the fixes merged in #27 and #28 since v0.61.1.

Checks

  • gofmt, go vet ./..., go run ./tools/wikicheck, go run ./tools/skillcheck, npm run typecheck, npm run build, go run ./tools/bundlecheck (267.9 KB of 268 KB) and go test ./... all pass. GOOS=windows go build ./cmd/form-md builds.
  • Live desktop-mode server in headless Chrome: two PNGs and a zip (PNG, GIF, .txt, __MACOSX entry) picked in one file dialog, which allowed several files. All four images were added to the property and the gallery card shows the first as its cover. The toast read "Added 4 files, 2 skipped" and its ? listed both skipped entries.
  • A forced server failure answered 500 with the request id and cause. The ? dialog showed both, and form-md.log held the same line. A non-desktop server sent the request id only and wrote no form-md.log.
  • /api/files/unzip returns 400 not_a_zip, 400 no_images with skipped, 400 bad_purpose and 401 without a session. No temp file is left behind.

Not run: an upload on Windows itself (the cause comes from the code and Go's Windows file sharing mode); a server with at-rest encryption on for the zip route; zips over the size and count caps; the UI under 4x CPU and network throttling.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

store wrote the upload to a temporary file and renamed it while the file
was still open. Windows refuses that rename (Go opens files there without
FILE_SHARE_DELETE), so every upload in the Windows desktop app answered
500 "internal error": a .png into a gallery's Files and media property,
covers, icons and fonts alike. The file is now closed after Sync, as the
backup, import and encrypt paths already do.
The desktop app keeps the server's output only until its window opens,
so a 500 afterwards left no line to read. In desktop mode the server now
also writes warnings and errors to form-md.log in the data folder, opened
after the data folder lock, with the run before kept as form-md.log.1.
Problem and Recover answer through httpx.Internal, which adds
data.request_id on every server. The desktop server, which listens on
loopback for its owner alone, also adds data.detail with the error text,
so the window can say what went wrong instead of only "internal error".
POST /api/files/unzip takes a zip with the same fields as POST /api/files
and stores each PNG, JPEG, GIF and WebP inside it through store, judged by
its content. Other entries, hidden folders, nested zips and entries over
the upload limit are listed as skipped with a reason. Reading is capped
per entry, at four times the limit in total and at 500 images. The zip is
kept encrypted on disk when at-rest encryption is on and always removed.
The Files and media editor picks several files at once and takes dropped
files; a zip is sent to /api/files/unzip and its images are added. Files
go one at a time under one toast that counts them, and are added in one
change at the end. A toast with details shows a ? that opens a centered
What went wrong dialog with the message, code, status, request id, the
desktop server's cause, the file and where the log is, with Copy. Cover,
icon and avatar upload failures get the same ?.
v0.62.0: uploads work in the Windows desktop app (every upload, a .png
into a gallery's Files and media property among them, answered
"Internal error."), Files and media takes several files and the images
inside a zip, an error toast's ? opens what went wrong, and the desktop
server keeps its warnings and errors in form-md.log in the data folder.
Also carries the person-only window command and Windows fixes merged
since v0.61.1.

gofmt, go vet, wikicheck, skillcheck, the TypeScript check, the web build
with bundlecheck and go test ./... pass at this commit.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 29, 2026 20:52
@nodemode-ai
nodemode-ai merged commit ca8e8c2 into main Nov 29, 2026
3 checks passed
@nodemode-ai
nodemode-ai deleted the feat/uploads-0.62.0 branch November 29, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant