Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function singleFile(e) {
- var files = e.files;
- if (e.files.length > 1) {
- alert('Only one file may be uploaded, cancelling operation...');
- e.preventDefault();
- }
- }
- </script>
- @(Html.Kendo().Upload()
- .Name("resumeAttachments")
- .Multiple(false)
- .Async(async => async
- .Save("ResumeSave", "File")
- )
- .Events(c => c
- .Upload("resumeOnUpload")
- )
- .Events(c => c
- .Success("resumeOnSuccess")
- )
- .Events(c => c
- .Complete("singleFile")
- )
- )
- function singleFile(e) {
- var upload = $("#resumeAttachments").data("kendoUpload");
- // disables the upload after upload
- upload.disable();
- }
- @using Kendo.Mvc.UI;
- <script type="text/javascript">
- $(document).ready(function() {
- $("#files").kendoUpload({"multiple":false,
- async: {
- saveUrl: '@Url.Action("Save", "Upload", new { typeOfUploadedFile= @Model.DocName.ToString(), @proposalNo = @Model.ProposalNo.ToString(), area = ""})',
- removeUrl: '@Url.Action("Remove", "Upload")',
- autoUpload: true
- }
- });
- });
- </script>
- var dropzone = $(".k-dropzone").addClass("hide");
- .hide {
- display: none; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement