diff --git a/api/layer/object.go b/api/layer/object.go index c7d160dbe..711a815d0 100644 --- a/api/layer/object.go +++ b/api/layer/object.go @@ -390,7 +390,10 @@ func (n *layer) objectPut(ctx context.Context, p putParams) (*object.Object, err p.userHeaders = make(map[string]string) } - p.userHeaders[AWS3NameHeader] = p.name + // Set object name if not set before + if _, ok := p.userHeaders[AWS3NameHeader]; !ok { + p.userHeaders[AWS3NameHeader] = p.name + } readBuffer := make([]byte, dataChunkSize) obj := &object.Object{