working commit

This commit is contained in:
2026-01-28 13:06:04 +02:00
parent 6db319088e
commit d647854e98
13 changed files with 293 additions and 45 deletions
+17 -10
View File
@@ -6,7 +6,7 @@ import (
)
func (hand *Handler) FileExists(rctx *router.Context) {
hand.logg.Debugf("handle FileExists")
hand.logg.Debugf("Handle FileExists")
filepath := rctx.PathMap["filepath"]
params := &operator.FileExistsParams{
@@ -19,21 +19,28 @@ func (hand *Handler) FileExists(rctx *router.Context) {
}
func (hand *Handler) PutFile(rctx *router.Context) {
hand.logg.Debugf("handle PutFile")
hand.logg.Debugf("Handle PutFile")
contentLength := rctx.GetHeader("Content-Length")
contentType := rctx.GetHeader("Content-Type")
filepath := rctx.PathMap["filepath"]
params := &operator.PutFileParams{
Filepath: filepath,
Source: rctx.Request.Body,
}
hand.logg.Debugf("filepath: %s", filepath)
code, _, _ := hand.oper.PutFile(params)
params := &operator.PutFileParams{
Filepath: filepath,
ContentLength: contentLength,
ContentType: contentType,
Source: rctx.Request.Body,
}
code, res, err := hand.oper.PutFile(params)
if err != nil {
hand.logg.Errorf("Error: %v", err)
}
rctx.SetStatus(code)
hand.SendResult(rctx, res)
}
func (hand *Handler) GetFile(rctx *router.Context) {
hand.logg.Debugf("handle GetFile")
hand.logg.Debugf("Handle GetFile")
filepath := rctx.PathMap["filepath"]
params := &operator.GetFileParams{
@@ -48,7 +55,7 @@ func (hand *Handler) GetFile(rctx *router.Context) {
}
func (hand *Handler) DeleteFile(rctx *router.Context) {
hand.logg.Debugf("handle DeleteFile")
hand.logg.Debugf("Handle DeleteFile")
filepath := rctx.PathMap["filepath"]
params := &operator.DeleteFileParams{
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
func (hand *Handler) SendHello(rctx *router.Context) {
hand.logg.Debugf("handle sendHello")
hand.logg.Debugf("Handle SendHello")
params := &operator.SendHelloParams{}
res, _ := hand.oper.SendHello(params)