imageBrowser.transport.create Object|String

Options or URL which will handle the directory creation. If not specified that create new folder button will not be present.

Important: The value of transport.create is passed to jQuery.ajax.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: "/create"
    }
  }
});
</script>

imageBrowser.transport.create.contentType String

The content-type HTTP header sent to the server. Default is "application/x-www-form-urlencoded". Use "application/json" if the content is JSON. Refer to the jQuery.ajax documentation for further info.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        contentType: "application/json"
      }
    }
  }
});
</script>

imageBrowser.transport.create.data Object|String|Function

Data to be send to the server. Refer to the jQuery.ajax documentation for further info.

Example - specify data as object

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        data: {
          id: 42,
          name: "John Doe"
        }
      }
    }
  }
});
</script>

Example - specify data as function

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        data: function() {
          return {
            id: 42,
            name: "John Doe"
          };
        }
      }
    }
  }
});
</script>

imageBrowser.transport.create.dataType String

The type of data that you're expecting back from the server. Commonly used values are "json" and "jsonp". Refer to the jQuery.ajax documentation for further info.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        dataType: "json"
      }
    }
  }
});
</script>

imageBrowser.transport.create.type String

The type of request to make ("POST", "GET", "PUT" or "DELETE"), default is "POST". Refer to the jQuery.ajax documentation for further info.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        type: "POST"
      }
    }
  }
});
</script>

imageBrowser.transport.create.url String|Function

The remote url to call when creating a new record.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        url: "/create"
      }
    }
  }
});
</script>

Example - specify create url as function

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  imageBrowser: {
    transport: {
      create: {
        url: function(params) {
          // build url
          return "/create?t=" + new Date().getTime();
        }
      }
    }
  }
});
</script>
In this article