MCPcopy Create free account
hub / github.com/pydio/cells / PutObject

Method PutObject

common/nodes/sync/handler-sync-cache.go:286–297  ·  view source on GitHub ↗
(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData)

Source from the content-addressed store, hash-verified

284}
285
286func (s *CacheHandler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (models.ObjectInfo, error) {
287 w, e := s.Next.PutObject(ctx, node, reader, requestData)
288 if nodes.IsFlatStorage(ctx, "in") {
289 return w, e
290 }
291 if e == nil {
292 newNode := node.Clone()
293 newNode.Size = w.Size
294 s.cacheAdd(ctx, newNode)
295 }
296 return w, e
297}
298
299func (s *CacheHandler) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, uploadedParts []models.MultipartObjectPart) (models.ObjectInfo, error) {
300 log.Logger(ctx).Info("[SynchronousCache] MultipartComplete", target.Zap())

Callers

nothing calls this directly

Calls 4

cacheAddMethod · 0.95
IsFlatStorageFunction · 0.92
PutObjectMethod · 0.65
CloneMethod · 0.65

Tested by

no test coverage detected