HI Folks,
I am new to kendo ui and i am using the file upload plugin in my asp.net mvc application.Everything works like a dream.But i have one additional requirement. When i am uploading the file i am assigning a unique image guid to the image file and uploading and then returning to the callback function.Here is my code.
<script type="text/javascript">
$(document).ready(function () {
$("#attachments").kendoUpload({
async: {
saveUrl: '@Url.Action("UploadBlogImages", "Blog")',
removeUrl: '@Url.Action("Remove", "Blog")',
autoUpload: true
},
success: function (data) {
var imageGuids = data.response;
$.each(imageGuids, function (index, imageGuid) {
$('#form_uploadPic').append('<input type="hidden" value=' + imageGuid + 'name="ImgGuid">');
});
}
});
});
</script>
I need to delete the file when the user clicks the remove button but my problem is,
by default the remove button passes the name of the file(that was used at the time of upload)as the file name to delete.But I am
renaming the file before uploading to server.I am assigning a unique guid to file.I have returned that guid to the success function.How do i configure so that the remove button passes that guid to server for deleting the file.
Thanks,
S
I am new to kendo ui and i am using the file upload plugin in my asp.net mvc application.Everything works like a dream.But i have one additional requirement. When i am uploading the file i am assigning a unique image guid to the image file and uploading and then returning to the callback function.Here is my code.
<script type="text/javascript">
$(document).ready(function () {
$("#attachments").kendoUpload({
async: {
saveUrl: '@Url.Action("UploadBlogImages", "Blog")',
removeUrl: '@Url.Action("Remove", "Blog")',
autoUpload: true
},
success: function (data) {
var imageGuids = data.response;
$.each(imageGuids, function (index, imageGuid) {
$('#form_uploadPic').append('<input type="hidden" value=' + imageGuid + 'name="ImgGuid">');
});
}
});
});
</script>
I need to delete the file when the user clicks the remove button but my problem is,
by default the remove button passes the name of the file(that was used at the time of upload)as the file name to delete.But I am
renaming the file before uploading to server.I am assigning a unique guid to file.I have returned that guid to the success function.How do i configure so that the remove button passes that guid to server for deleting the file.
Thanks,
S