Management API: POST/DELETE /materials/{id}/files (attach.Store, 50 MB, 20 files), DELETE /materials/{id} removes files; download keeps the file name

This commit is contained in:
Jakub Zych
2026-10-17 17:53:22 +02:00
parent 584d15257c
commit 996b4d1542
44 changed files with 463 additions and 56 deletions

View File

@@ -14,6 +14,7 @@ import (
"git.golem15.com/golem15/summercms/modules/bouncer"
"git.golem15.com/golem15/summercms/modules/phrasebook"
"git.golem15.com/golem15/summercms/modules/wire"
"gocloud.dev/blob"
"gorm.io/gorm"
)
@@ -33,6 +34,9 @@ type Handlers struct {
PerPage int
// DashboardLimit is the number of sessions and deadlines on /dashboard.
DashboardLimit int
// Bucket returns the uploads bucket for material files, or nil while
// none is published.
Bucket func() *blob.Bucket
// PublicURL is the absolute base URL of the application
// (jz.bm.public_url), used for the calendar feed URL and the links in
// it. Empty means the scheme and Host of the request.