Ingest Encoded File

Ingest a Base64 encoded file.

By providing the content name, the MIME type and Base-64 encoded string containing the file data, Graphlit creates a content object which is processed by the content workflow.

Ingest Base64 Encoded File

When you have the Base64 encoded bytes of a file that you want to add to Graphlit as content, you can use the ingestEncodedmutation. Since Graphlit can't identify the file type from the Base64 data, you must provide the MIME type of the encoded file.

Mutation:

mutation IngestEncodedFile($name: String!, $data: String!, $mimeType: String!, $id: ID) {
  ingestEncodedFile(name: $name, data: $data, mimeType: $mimeType, id: $id) {
    id
    name
    state
    type
    fileType
    mimeType
    uri
  }
}

Variables:

{
  "name": "graphlit-logo",
  "data": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBmaWxsOiAjMzQ5OTQ2OwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNjMzM7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmY2QwNTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZmZmZWYyOwogICAgICAgIHN0cm9rZTogIzVhNjVhZTsKICAgICAgICBzdHJva2Utd2lkdGg6IDEycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCwgLmNscy01IHsKICAgICAgICBmaWxsLXJ1bGU6IGV2ZW5vZGQ7CiAgICAgIH0KCiAgICAgIC5jbHMtNiB7CiAgICAgICAgZmlsbDogIzAwOTljZDsKICAgICAgfQoKICAgICAgLmNscy03IHsKICAgICAgICBmaWxsOiAjNmZiZTQ0OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM2Njk7CiA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GgxMDQtNS0yLTMiIGRhdGEtbmFtZT0icGF0aDEwNC01LTIiIGNsYXNzPSJjbHMtNiIgZD0ibTE4OS4zMiw5NC42YzAsNS44NS00LjcsMTAuNi0xMC40OSwxMC42cy0xMC40OS00Ljc1LTEwLjQ5LTEwLjYsNC43LTEwLjYsMTAuNDktMTAuNiwxMC40OSw0Ljc1LDEwLjQ5LDEwLjYiLz4KICA8L2c+CiAgPGcgaWQ9ImcxMDItMS0yIiBkYXRhLW5hbWU9ImcxMDItMSI+CiAgICA8cGF0aCBpZD0icGF0aDEwNC01LTIiIGRhdGEtbmFtZT0icGF0aDEwNC01IiBjbGFzcz0iY2xzLTEiIGQ9Im0yNjkuNzgsMTYyLjA0YzAsNS4yMi00LjE5LDkuNDYtOS4zNiw5LjQ2cy05LjM2LTQuMjMtOS4zNi05LjQ2LDQuMTktOS40Niw5LjM2LTkuNDYsOS4zNiw0LjIzLDkuMzYsOS40NiIvPgogIDwvZz4KICA8ZyBpZD0iZzg2LTktNCIgZGF0YS1uYW1lPSJnODYtOSI+CiAgICA8cGF0aCBpZD0icGF0aDg4LTItNCIgZGF0YS1uYW1lPSJwYXRoODgtMiIgY2xhc3M9ImNscy0xMCIgZD0ibTk2LjIzLDE4OS4wN2wxNS4zNi03LjAxLDEzLjgxLDkuOTQtMS41NSwxNi45NS0xNS4zNiw3LjAxLTEzLjgxLTkuOTQsMS41NS0xNi45NVoiLz4KICA8L2c+Cjwvc3ZnPg==",
  "mimeType": "image/svg+xml"
}

Response:

{
  "type": "FILE",
  "mimeType": "image/svg+xml",
  "fileType": "DRAWING",
  "uri": "https://redacted.blob.core.windows.net/files/97584e89-73d1-4552-872b-51c4c664475b/graphlit-logo.svg",
  "id": "97584e89-73d1-4552-872b-51c4c664475b",
  "name": "graphlit-logo",
  "state": "CREATED"
}

Last updated