Compare commits

...
Author SHA1 Message Date
Brendonovich 44287069e4 fix(app): use HTTP-safe UUID for attachment uploads 2026-09-28 05:47:47 +00:00
@@ -2,6 +2,7 @@ import type { Accessor } from "solid-js"
import { useServer } from "@/runtime/server/current"
import { useServerSDK } from "@/runtime/server/client"
import { authTokenFromCredentials } from "@/runtime/server/api"
import { uuid } from "@/runtime/persistence/uuid"
import { useWorkspaceLocation } from "@/workspaces/location"
import type { ComposerControls } from "../adapter"
@@ -28,7 +29,7 @@ export function useAttachmentDestination(controls: Accessor<ComposerControls>) {
// normalizes the separators and returns the resolved path.
const url = new URL("/api/experimental/fs/write", server.conn.http.url)
url.searchParams.set("location[directory]", location().directory)
url.searchParams.set("path", `${info.paths.tmp}/uploads/${crypto.randomUUID()}/${file.name}`)
url.searchParams.set("path", `${info.paths.tmp}/uploads/${uuid()}/${file.name}`)
return write(url, file, server.conn.http.password, report, signal)
},
})