Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Uploading Files

Uploading Files

You can call an HTTP endpoint to upload a file to Telerik Platform. Files are stored in the cloud and delivered for download through a CDN.

To upload a file, you have to use the following RESTful API call. Base64 format is used in the request to represent the file.

var fileObj = {
    "Filename":"everlive.png",
    "ContentType":"image/png",
    "base64": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALoSURBVEhLnVbNalNREA7JbZ+gfYQ+QvsI9hVcadOV2HUL2enSuHbVjetm3Z2ga8GFSVoo1AYEoQQqgiIUCvrNz5kz5yf3RsPhcu/NPfPN982cmenNDgbTp4PZQYMr39hq9H6Im/alFvizwfxwQwzOeGPPNjNAPzxmSALWzIcbsk2vAVgt8uP8cJPs0Ge0BQCMRgz6RiXwMMfVo7mxSWk56gAAA3NUAcjfz0/6WE4iAY5XdX8IHp6E48rvo0RM1ElEwRBk2pPGQ1maOIRRasWymETsx8AkMosiSxlttmhGV0deAUJ4lIFLocK60/365d7i9T4WbtJQi0NpFjFGlYF3n7Ytxvs/Pk7+pL+HX9/vPpxeHe+4UFkMJJYRwItuDOhv7P958S4znT1+e/vMZ12UKJwDy5Pc8esXu3Cz3br8+/XNY3O5BEhy0cK7vnUA3C9v7MDGg+YYiERy0GhBmTV9N36Ik+RYmUVqlA+BylXVHS8peYbN1cnO78WnTLrbs5GWEykVLk3pBPhKdzN+VOoO66YyNsNcF4DLIlEm6NOUGQlbSBU6AWNasF4KSAyqEpnuwuvi+dY6aVN+Qwci1iKpplwqpmnZWdT06YSEgLAjZzsPsqkvVEpxO60j4JdH265UbE5RlUOB6Zn0/wdw9/708mjLt7y84VgKSbcpGdwvv+Dl7WREV1uTEaLNjmfntCoRh2EVAwCwj6ElWNGOjdq1ptUxIEeAUT0EqATL81cZA88G91pWDSBmUTFM/GuRkCzALsFIswhpGgBaVOpMJPmAq0UlBtro/WRQlpp1MBxA7OHS0bIu3yA9qgWjBQYSUVIlQSazKlFtrGvQEpbn486O5nonWXTngFtmMN0yrfgBiSZMX1bpPk3cFIAZ8LyVtOL65KLTYAGQTK7CgFGl6RdZVM5FwWL01HudTL5JFsngxdW0b9e2sS4OW27Qw3Y75CxXHgPrxq4x2H6bM6zghHHYs/EAfrpmh/4C3uTevq5C1CEAAAAASUVORK5CYII="
};

$.ajax({
    type: "POST",
    url: 'https://api.everlive.com/v1/your-app-id/Files',
    headers: { "Authorization" : "Bearer your-access-token-here" },
    contentType: "application/json",
    data: JSON.stringify(fileObj),
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
})
Request:
    POST https://api.everlive.com/v1/your-app-id/Files
Headers:
    Authorization  Bearer your-access-token-here
    Content-Type application/json
Payload - raw:
    {
        "Filename":"everlive.png",
        "ContentType":"image/png",
        "base64": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALoSURBVEhLnVbNalNREA7JbZ+gfYQ+QvsI9hVcadOV2HUL2enSuHbVjetm3Z2ga8GFSVoo1AYEoQQqgiIUCvrNz5kz5yf3RsPhcu/NPfPN982cmenNDgbTp4PZQYMr39hq9H6Im/alFvizwfxwQwzOeGPPNjNAPzxmSALWzIcbsk2vAVgt8uP8cJPs0Ge0BQCMRgz6RiXwMMfVo7mxSWk56gAAA3NUAcjfz0/6WE4iAY5XdX8IHp6E48rvo0RM1ElEwRBk2pPGQ1maOIRRasWymETsx8AkMosiSxlttmhGV0deAUJ4lIFLocK60/365d7i9T4WbtJQi0NpFjFGlYF3n7Ytxvs/Pk7+pL+HX9/vPpxeHe+4UFkMJJYRwItuDOhv7P958S4znT1+e/vMZ12UKJwDy5Pc8esXu3Cz3br8+/XNY3O5BEhy0cK7vnUA3C9v7MDGg+YYiERy0GhBmTV9N36Ik+RYmUVqlA+BylXVHS8peYbN1cnO78WnTLrbs5GWEykVLk3pBPhKdzN+VOoO66YyNsNcF4DLIlEm6NOUGQlbSBU6AWNasF4KSAyqEpnuwuvi+dY6aVN+Qwci1iKpplwqpmnZWdT06YSEgLAjZzsPsqkvVEpxO60j4JdH265UbE5RlUOB6Zn0/wdw9/708mjLt7y84VgKSbcpGdwvv+Dl7WREV1uTEaLNjmfntCoRh2EVAwCwj6ElWNGOjdq1ptUxIEeAUT0EqATL81cZA88G91pWDSBmUTFM/GuRkCzALsFIswhpGgBaVOpMJPmAq0UlBtro/WRQlpp1MBxA7OHS0bIu3yA9qgWjBQYSUVIlQSazKlFtrGvQEpbn486O5nonWXTngFtmMN0yrfgBiSZMX1bpPk3cFIAZ8LyVtOL65KLTYAGQTK7CgFGl6RdZVM5FwWL01HudTL5JFsngxdW0b9e2sS4OW27Qw3Y75CxXHgPrxq4x2H6bM6zghHHYs/EAfrpmh/4C3uTevq5C1CEAAAAASUVORK5CYII="
    }
Response:
    Status: 200 OK
    Content-Type: application/json

Size Limitations and Timeouts

Currently the max size of a request body with JSON data that Telerik Platform accepts is 4 MB. The base64 encoding bloats the size of binary data with 4/3 therefore the max size of a file send in base64 format is around 3 MB. There is no such limit if the file is uploaded with multipart/form-data media type.

In addition, if the upload request does not complete within 10 minutes, it will time out.

Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.