Skip to content

Commit

Permalink
Merge pull request #139 from tarilabs/tarilabs-20240605-docMediaType
Browse files Browse the repository at this point in the history
docs: use valid media_type format in examples
  • Loading branch information
vsoch authored Jun 6, 2024
2 parents 19f4528 + 6677014 commit 571a23f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/getting_started/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ import oras.defaults

layers = []
for blob in blobs:
layer = oras.oci.NewLayer(blob, is_dir=False, media_type="org.dinosaur.tools.blobish")
layer = oras.oci.NewLayer(blob, is_dir=False, media_type="application/x-org.dinosaur.tools.blobish")

# This is important so oras clients can derive the relative name you want to download to
# Using basename assumes a flat directory of files - it doesn't have to be.
Expand Down Expand Up @@ -390,7 +390,7 @@ class Registry(oras.provider.Registry):

blob = item.get("path")
media_type = (
item.get("media_type") or "org.dinosaur.tool.datatype"
item.get("media_type") or "application/x-org.dinosaur.tool.datatype"
)
annots = item.get("annotations") or {}

Expand Down Expand Up @@ -464,7 +464,7 @@ def push(uri, root):
for filename in os.listdir(root):

# use some logic here to derive the mediaType
media_type = "org.dinosaur.tool.datatype"
media_type = "application/x-org.dinosaur.tool.datatype"

# Add some custom annotations!
size = os.path.getsize(os.path.join(root, filename)) # bytes
Expand Down

0 comments on commit 571a23f

Please sign in to comment.