code: func (bs *blobStore) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error) {
  	dgst := digest.FromBytes(p)
  	desc, err := bs.statter.Stat(ctx, dgst)
  	if err == nil {
  		// content already present
  		return desc, nil
  	} else if err != distribution.ErrBlobUnknown {
  		dcontext.GetLogger(ctx).Errorf("blobStore: error stating content (%v): %v", dgst, err)
  		// real error, return it
  		return distribution.Descriptor{}, err
  	}
  
  	bp, err := bs.path(dgst)
  	if err != nil {
  		return distribution.Descriptor{}, err
  	}
  
  	// TODO(stevvooe): Write out mediatype here, as well.
  	return distribution.Descriptor{
  		Size: int64(len(p)),
  
  		// NOTE(stevvooe): The central blob store firewalls media types from
  		// other users. The caller should look this up and override the value
  		// for the specific repository.
  		MediaType: "application/octet-stream",
  		Digest:    dgst,
  	}, bs.driver.PutContent(ctx, bp, p)
  }
docs: // Put stores the content p in the blob store, calculating the digest. If the
  // content is already present, only the digest will be returned. This should
  // only be used for small objects, such as manifests. This implemented as a convenience for other Put implementations