Edit this page

Upload Files to OData Service

By default, the Upload uploads files as FileData.

In order for the OData service to consume a file, the body of the sent request has to include the file buffer. To allow the Upload to utilize the FileReader of the browser and send a request that satisfies the OData specification for Media Entities, set the useArrayBuffer option to true.

Important

The useArrayBuffer option enables you to use the Upload in SharePoint 2013 and utilize its native REST service for the file upload mechanism.

Example
<input type="file" name="files" id="photos" />
<script>
    $("#photos").kendoUpload({
        async: {
            saveUrl: "http://my-app.localhost/save",
            removeUrl: "http://my-app.localhost/remove",
            useArrayBuffer: true
        }
    });
</script>

See Also

For more runnable examples on the Kendo UI Upload widget, browse its How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy