method

Backend.Put

func (backend *Backend) Put( ctx context.Context, key string, source io.Reader, size int64, _ string, ) (result error)

Atomically and durably write an object with its declared size.

Source adapters/storage/local/local.go:139

@param ctx
The ctx value.
@param key
The key value.
@param source
The source value.
@param size
The size value.
@param _
The _ value.
@returns
The declared result.

The local backend does not persist contentType. It rejects traversal/path-shaped object keys and size mismatches, and preserves an existing object when a replacement fails.

Related types

  • Backend

    A filesystem implementation of storage.Backend.