Edit this page

validation Object

Configures the validation options for uploaded files.

Example

 <input name="files" id="files" type="file" />
 <script>
    $(document).ready(function() {
        $("#files").kendoUpload({
            async: {
                saveUrl: "http://my-app.localhost/save",
                removeUrl: "http://my-app.localhost/remove"
            },
            validation: {
                allowedExtensions: [".jpg"],
                maxFileSize: 900000,
                minFileSize: 300000
            }
    });
});
</script>

validation.allowedExtensions Array

A list of the file extensions which are allowed for upload. Recognizes entries of both .type and type values.

Example

<input name="files" id="files" type="file" />
<script>
    $(document).ready(function() {
        $("#files").kendoUpload({
            async: {
                saveUrl: "http://my-app.localhost/save",
                removeUrl: "http://my-app.localhost/remove"
            },
            validation: {
                allowedExtensions: [".jpg"],
            }
        });
    });
</script>

validation.maxFileSize Number

Defines the maximum file size in bytes allowed for upload.

Example

<input name="files" id="files" type="file" />
<script>
    $(document).ready(function() {
        $("#files").kendoUpload({
            async: {
                saveUrl: "http://my-app.localhost/save",
                removeUrl: "http://my-app.localhost/remove"
            },
            validation: {
                maxFileSize: 900000
            }
        });
    });
</script>

validation.minFileSize Number

Defines the minimum file size in bytes allowed for upload.

Example

<input name="files" id="files" type="file" />
<script>
    $(document).ready(function() {
        $("#files").kendoUpload({
            async: {
                saveUrl: "http://my-app.localhost/save",
                removeUrl: "http://my-app.localhost/remove"
            },
            validation: {
                minFileSize: 300000
            }
        });
    });
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy