working commit

This commit is contained in:
2026-02-05 18:03:42 +02:00
parent fcd7d50d75
commit f3d0572bca
5 changed files with 6 additions and 39 deletions
+1 -8
View File
@@ -101,8 +101,6 @@ func (oper *Operator) PutFile(ctx context.Context, param *PutFileParams) (int, *
filename := path.Base(xfilepath)
collection := path.Dir(xfilepath)
oper.logg.Debugf("Put file [%s] [%s]", collection, filename)
tmpname, size, checksum, err := oper.store.WriteTempFile(param.Source)
if err != nil {
code := http.StatusInternalServerError
@@ -178,8 +176,6 @@ func (oper *Operator) GetFile(ctx context.Context, param *GetFileParams) (int, *
filename := path.Base(xfilepath)
collection := path.Dir(xfilepath)
oper.logg.Debugf("Get file [%s] [%s]", collection, filename)
descrExists, fileDescr, err := oper.mdb.GetFileByCollection(ctx, collection, filename)
if err != nil {
code := http.StatusInternalServerError
@@ -259,14 +255,11 @@ func (oper *Operator) ListFiles(ctx context.Context, param *ListFilesParams) (in
// TODO: convert file path to a unified and secure state
xfilepath, err := cleanFilepath(param.Filepath)
_, err = cleanFilepath(param.Filepath)
if err != nil {
code := http.StatusInternalServerError
return code, res, err
}
collection := xfilepath
oper.logg.Debugf("List files by %s", collection)
fileDescrs, err := oper.mdb.ListAllFiles(ctx)
if err != nil {