working room saves

This commit is contained in:
Devin Zuczek
2026-07-05 22:55:56 -04:00
parent 5a2e3f6e1a
commit 3b9d59239e
10 changed files with 469 additions and 3 deletions
+5 -1
View File
@@ -19,9 +19,13 @@ import type { App } from './context'
* stored under. `Unknown` (0) is intentionally absent: like the reference
* server's `makeUploadName`, an unrecognized type has no destination and is
* rejected rather than stored.
*
* RoomSave (1) lands under `room/` (not `roomsave/`) so the `cdn` worker's
* `GET /room/:dataBlob` route serves the blob back — both bind the same
* `recflare-cdn` bucket, so the key prefixes must match.
*/
const UPLOAD_SUBFOLDER: Record<number, string> = {
1: 'roomsave',
1: 'room',
2: 'holotar',
3: 'image',
4: 'video',
@@ -79,7 +79,8 @@ it('POST /upload stores a RoomMetadata (FileType 6) file under roommetadata/ and
it('POST /upload folders each FileType under its own subfolder', async () => {
const headers = await bearer()
const cases: Array<[string, string]> = [
['1', 'roomsave'],
// RoomSave lands under `room/` so the cdn worker's /room/:dataBlob serves it.
['1', 'room'],
['3', 'image'],
['5', 'invention'],
]