working commit
This commit is contained in:
+5
-15
@@ -10,9 +10,8 @@ import (
|
||||
const zeroContentLength = "0"
|
||||
|
||||
func (hand *Handler) FileExists(rctx *router.Context) {
|
||||
hand.logg.Debugf("Handle FileExists")
|
||||
|
||||
filepath := rctx.PathMap["filepath"]
|
||||
filepath := rctx.GetSubpath("filepath")
|
||||
params := &operator.FileExistsParams{
|
||||
Filepath: filepath,
|
||||
}
|
||||
@@ -32,13 +31,9 @@ func (hand *Handler) FileExists(rctx *router.Context) {
|
||||
}
|
||||
|
||||
func (hand *Handler) PutFile(rctx *router.Context) {
|
||||
hand.logg.Debugf("Handle PutFile")
|
||||
|
||||
contentLength := rctx.GetHeader("Content-Length")
|
||||
contentType := rctx.GetHeader("Content-Type")
|
||||
filepath := rctx.PathMap["filepath"]
|
||||
|
||||
hand.logg.Debugf("Content-Length=%s", rctx.GetHeader("Content-Length"))
|
||||
filepath := rctx.GetSubpath("filepath")
|
||||
|
||||
params := &operator.PutFileParams{
|
||||
Filepath: filepath,
|
||||
@@ -58,14 +53,11 @@ func (hand *Handler) PutFile(rctx *router.Context) {
|
||||
}
|
||||
|
||||
func (hand *Handler) GetFile(rctx *router.Context) {
|
||||
hand.logg.Debugf("Handle GetFile")
|
||||
|
||||
filepath := rctx.PathMap["filepath"]
|
||||
filepath := rctx.GetSubpath("filepath")
|
||||
params := &operator.GetFileParams{
|
||||
Filepath: filepath,
|
||||
}
|
||||
hand.logg.Debugf("filepath: %s", filepath)
|
||||
|
||||
ctx := rctx.GetContext()
|
||||
code, res, err := hand.oper.GetFile(ctx, params)
|
||||
if err != nil {
|
||||
@@ -90,9 +82,8 @@ func (hand *Handler) GetFile(rctx *router.Context) {
|
||||
}
|
||||
|
||||
func (hand *Handler) DeleteFile(rctx *router.Context) {
|
||||
hand.logg.Debugf("Handle DeleteFile")
|
||||
|
||||
filepath := rctx.PathMap["filepath"]
|
||||
filepath := rctx.GetSubpath("filepath")
|
||||
params := &operator.DeleteFileParams{
|
||||
Filepath: filepath,
|
||||
}
|
||||
@@ -106,9 +97,8 @@ func (hand *Handler) DeleteFile(rctx *router.Context) {
|
||||
}
|
||||
|
||||
func (hand *Handler) ListFiles(rctx *router.Context) {
|
||||
hand.logg.Debugf("Handle ListFiles")
|
||||
|
||||
filepath := rctx.PathMap["filepath"]
|
||||
filepath := rctx.GetSubpath("filepath")
|
||||
params := &operator.ListFilesParams{
|
||||
Filepath: filepath,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user