diff --git a/internal/http/services/owncloud/ocdav/copy.go b/internal/http/services/owncloud/ocdav/copy.go index e078d323ef..a4905b1411 100644 --- a/internal/http/services/owncloud/ocdav/copy.go +++ b/internal/http/services/owncloud/ocdav/copy.go @@ -247,11 +247,17 @@ func (s *svc) executePathCopy(ctx context.Context, selector pool.Selectable[gate Ref: cp.destination, Opaque: &typespb.Opaque{ Map: map[string]*typespb.OpaqueEntry{ - "Upload-Length": { + net.HeaderUploadLength: { Decoder: "plain", // TODO: handle case where size is not known in advance Value: []byte(strconv.FormatUint(cp.sourceInfo.GetSize(), 10)), }, + net.HeaderOCMtime: { + Decoder: "plain", + Value: []byte( + utils.TimeToOCMtime(utils.TSToTime(cp.sourceInfo.GetMtime())), + ), + }, }, }, } @@ -461,6 +467,12 @@ func (s *svc) executeSpacesCopy(ctx context.Context, w http.ResponseWriter, sele // TODO: handle case where size is not known in advance Value: []byte(strconv.FormatUint(cp.sourceInfo.GetSize(), 10)), }, + net.HeaderOCMtime: { + Decoder: "plain", + Value: []byte( + utils.TimeToOCMtime(utils.TSToTime(cp.sourceInfo.GetMtime())), + ), + }, }, }, }