1

上传程序正常工作,但是当我尝试“删除”任何上传的文件时,文件将被正确删除,但 html 页面中的行仍然像点击之前一样!单击“删除”按钮后如何删除行?

这是这里的代码:

<script>
  $(function() {

     $("#upload").kendoUpload({
         async: {
                    saveUrl: "modules/save.php",
                    removeUrl: "modules/remove.php",
                    autoUpload: true,
                    multiple: true
                }
            });

    });

</script>

这是remove.php:

    <?php
           $targetdir = "../files/";
           $targetPath = $targetdir.$_POST["fileNames"];
           unlink($targetPath);
           echo "";
    ?>
4

3 回答 3

0
...
async: {
    saveUrl: "modules/save.php",
    removeUrl: "modules/remove.php",
    autoUpload: true,
    multiple: true,
    removeField: "fileNames[]"
}
于 2014-12-23T01:24:03.933 回答
0

检查这个问题:KendoUI Uploader Remove

对我来说,改变返回类型就可以了。

public ActionResult RemoveFile(string[] fileNames)
{
    return Content("");
}

public ActionResult RemoveFile(string[] fileNames)
{
    return Json("");
}

我离开了我的 SaveFile() 函数return Content("");

于 2013-05-31T17:19:32.953 回答
0

<?php $targetdir = "../files/"; $targetPath = $targetdir.$_POST["fileNames"]; unlink($targetPath); echo "{}"; ?>

于 2013-07-31T09:42:05.910 回答