fileBrowser.transport.destroy Object|String

Options or URL which will handle the file and directory deletion. If not specified the delete button will not be present.

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

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: "/destroy"
    }
  }
});
</script>

fileBrowser.transport.destroy.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({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        contentType: "application/json"
      }
    }
  }
});
</script>

fileBrowser.transport.destroy.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({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        data: {
          id: 42,
          name: "John Doe"
        }
      }
    }
  }
});
</script>

Example - specify Data As Function

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        data: function() {
          return {
            id: 42,
            name: "John Doe"
          };
        }
      }
    }
  }
});
</script>

fileBrowser.transport.destroy.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({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        dataType: "json"
      }
    }
  }
});
</script>

fileBrowser.transport.destroy.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({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        type: "POST"
      }
    }
  }
});
</script>

fileBrowser.transport.destroy.url String|Function

The remote url to call when creating a new record.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        url: "/destroy"
      }
    }
  }
});
</script>

Example - specify Destroy URL As Function

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "insertFile"
  ],
  fileBrowser: {
    transport: {
      destroy: {
        url: function(params) {
          // build url
          return "/destroy?t=" + new Date().getTime();
        }
      }
    }
  }
});
</script>
In this article