method

Backend.Put

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

Upload a size-checked object using a SigV4 payload hash.

Source adapters/storage/s3/s3.go:106

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

Seekable inputs are hashed then rewound. Non-seekable inputs use a bounded temporary spool that is cleaned on success, error, or cancellation.

Related types

  • Backend

    An S3 storage and URL-signing backend.