Keep page files in the shared drive's Media folder, not Blog

The folder isn't only for blog posts. A Blog folder made before this
can be renamed to Media in Drive; its files keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-29 19:33:19 -05:00
parent 6191322fea
commit b504c24fb0
5 changed files with 14 additions and 10 deletions

View file

@ -3,7 +3,7 @@
The site keeps files in one Google **shared drive**: the Request form
(`/request`) puts what people send in its "Requests" folder, and files
uploaded in Tools → Media → Files, for pages to link to, go in its
"Blog" folder (see "Files for pages" below). New requests can be emailed to whoever is listed in
"Media" folder (see "Files for pages" below). New requests can be emailed to whoever is listed in
Panel → Site settings → Notices. Both go through one Google **service
account** (`server/src/googleService.js`). Nothing here is needed for
the rest of the site; until it's set up, the form takes no files and no
@ -61,12 +61,16 @@ hand.
| Folder | Used by | Set in |
| --- | --- | --- |
| `Requests` | Files sent with the Request form | `DRIVE_FOLDER` in `server/src/routes/requests.js` |
| `Blog` | Files for pages to link to (Tools → Media → Files) | `FOLDER` in `server/src/routes/files.js` |
| `Media` | Files for pages to link to (Tools → Media → Files) | `FOLDER` in `server/src/routes/files.js` |
A new use calls `driveUpload("<Folder>", name, mime, bytes)` from
`server/src/googleService.js`; a path such as `"Blog/2026"` makes each
`server/src/googleService.js`; a path such as `"Media/2026"` makes each
level. Add it to this table.
Files for pages went in a folder called `Blog` before v1.9.10. If the
shared drive has one, rename it to `Media` in Drive: the files inside
keep working and stay listed, and nothing is made twice.
Folders are matched by name, so renaming or moving one in Drive makes
the site start a new one under the old name (files already stored keep
working: they're found by their own id). People can add their own
@ -173,7 +177,7 @@ from it"), the same conversion as Blog posts → Import from Word
## Files for pages
Tools → Media → **Files** (editors and up upload, admins and up delete)
puts a file in the shared drive's `Blog` folder and shares it as
puts a file in the shared drive's `Media` folder and shares it as
**anyone with the link can view**, so visitors open it in Drive's viewer
without signing in. Content block links pick from it with **Choose a
file**: paragraph, button and image links, list and link-button items,
@ -189,7 +193,7 @@ Drive" above the title.
little after upload. The server asks at once and again over the next
few minutes, and saves it into the image library as an ordinary
upload. Audio and zips get an icon in the admin and no picture.
- **Files put in the Blog folder in Drive itself** (dragged in, made
- **Files put in the Media folder in Drive itself** (dragged in, made
there, moved there) are listed too: opening the Files tab or a
"Choose a file" picker looks in the folder (at most every 30
seconds), adds anything new, shares it the same way and fetches its