Skip to content

Commit

Permalink
Append namespace in putChunked method
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Oct 27, 2020
1 parent acf5338 commit 13a882e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (s *svc) handlePut(w http.ResponseWriter, r *http.Request, ns string) {
w.WriteHeader(http.StatusBadRequest)
}
*/
s.handlePutChunked(w, r)
s.handlePutChunked(w, r, ns)
return
}

Expand Down
5 changes: 3 additions & 2 deletions internal/http/services/owncloud/ocdav/putchunked.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"io/ioutil"
"net/http"
"os"
"path"
"path/filepath"
"strconv"
"strings"
Expand Down Expand Up @@ -215,7 +216,7 @@ func (s *svc) saveChunk(ctx context.Context, path string, r io.ReadCloser) (bool

return true, assembledFileName, nil
}
func (s *svc) handlePutChunked(w http.ResponseWriter, r *http.Request) {
func (s *svc) handlePutChunked(w http.ResponseWriter, r *http.Request, ns string) {
ctx := r.Context()
log := appctx.GetLogger(ctx)

Expand Down Expand Up @@ -255,7 +256,7 @@ func (s *svc) handlePutChunked(w http.ResponseWriter, r *http.Request) {
}

chunkInfo, _ := getChunkBLOBInfo(fn)
fn = chunkInfo.path
fn = path.Join(applyLayout(ctx, ns), chunkInfo.path)

s.handlePutHelper(w, r, fd, fn, md.Size())

Expand Down

0 comments on commit 13a882e

Please sign in to comment.