mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
CLI: Add txt.JoinAnd() helper function to format lists of items #5233
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
"github.com/photoprism/photoprism/pkg/i18n"
|
||||
"github.com/photoprism/photoprism/pkg/media"
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
)
|
||||
|
||||
// UploadUserFiles adds files to the user's upload folder from where they can be processed and indexed.
|
||||
@@ -329,7 +330,7 @@ func ProcessUserUpload(router *gin.RouterGroup) {
|
||||
// Add imported files to albums if allowed.
|
||||
if len(frm.Albums) > 0 &&
|
||||
acl.Rules.AllowAny(acl.ResourceAlbums, s.GetUserRole(), acl.Permissions{acl.ActionCreate, acl.ActionUpload}) {
|
||||
log.Debugf("upload: adding files to album %s", clean.Log(strings.Join(frm.Albums, " and ")))
|
||||
log.Debugf("upload: adding files to album %s", clean.Log(txt.JoinAnd(frm.Albums)))
|
||||
opt.Albums = frm.Albums
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user