diff --git a/api/s5/http.go b/api/s5/http.go index 633399e..2b0990c 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -181,6 +181,8 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { return } + h.portal.Logger().Info("Hash", zap.String("hash", hex.EncodeToString(hash))) + cid, err := encoding.CIDFromHash(hash, uint64(bufferSize), types.CIDTypeRaw, types.HashTypeBlake3) if err != nil { @@ -197,6 +199,8 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { return } + h.portal.Logger().Info("CID", zap.String("cidStr", cidStr)) + upload, err := h.portal.Storage().CreateUpload(hash, uint(jc.Request.Context().Value(AuthUserIDKey).(uint64)), jc.Request.RemoteAddr, uint64(bufferSize), "s5") if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError)