Importing Multiple Markdown Files as One Multi-Page Asset

You may group together markdown files and upload them to Hub as a single multi-page asset, where each page is one of the markdown files uploaded.

You may only upload such assets using the Cloud Import method outlined below.

Uploading Multi-Markdown Assets

Step 1: Preparing the JSON

With URLs to the Markdown files

Prepare a JSON like the following, where each URL points to a markdown file you'd like to include in the asset. The order of the URLs will determine the order in which markdown files will be presented to the annotator as pages.

The following JSON will import two assets of four markdown files each:

[
  {
    "externalId": "my-asset-external-id-1",
    "dataset": [
      "https://url.com/65c18c8b-4513-4a0a-b876-1aeb2e0908ec.md",
      "https://url.com/b0b70590-e4cc-42ef-8537-3ee3f7917fed.md",
      "https://url.com/38e11364-1ce0-417a-9e38-436468c555ce.md",
      "https://url.com/eff59355-03bd-447f-aa47-46028f90c2e6.md"
    ]
  },
  {
    "externalId": "my-asset-external-id-2",
    "dataset": [
      "https://url.com/65c18c8b-4513-4a0a-b876-123456789012.md",
      "https://url.com/b0b70590-e4cc-42ef-8537-234456566787.md",
      "https://url.com/38e11364-1ce0-417a-9e38-876345383488.md",
      "https://url.com/eff59355-03bd-447f-aa47-319485019239.md"
    ]
  }
]

With the Markdown content directly

You may also choose to directly insert the Markdown content within the JSON file, like so:

[
  {
    "externalId": "my-asset-external-id-1",
    "dataset": [
      "Line 1 <br> Line 2 <br> Line 3... <em>and any HTML you need.</em>",
      "Line 1 <br> Line 2 <br> Line 3... <em>and any HTML you need.</em>",
      "Line 1 <br> Line 2 <br> Line 3... <em>and any HTML you need.</em>",
      "Line 1 <br> Line 2 <br> Line 3... <em>and any HTML you need.</em>"
    ]
  }
]

Step 2: Uploading the JSON

From your project dashboard, go to the Assets tab and click on Add Data. Then, enter the Upload Data URL section and drag and drop your JSON on the file upload field. Then, press on Upload. Your multi-image asset(s) will be uploaded.

Assets uploaded this way will have navigation buttons at the top, allowing annotators to navigate between the images in the dataset.

Last updated