当前位置: 代码迷 >> JavaScript >> 如何使用angularjs在kendoui中使用文件上传器?
  详细解决方案

如何使用angularjs在kendoui中使用文件上传器?

热度:103   发布时间:2023-06-07 16:40:33.0

我在angularjs中使用kenoui uploader,我可以上传文件,但无法保存该文件。

我的追求是如何在选项中提供saveUrl和removeUrl

这是我的下面的代码,

index.html

<input name="files"
                                       type="file"
                                       kendo-upload
                                       k-options="fileAttachmentConfig"
                                       k-select="onSelect" />

index-ctrl.js

    $scope.fileAttachmentConfig = {
        async: {
            saveUrl: 'app/images/client',
            removeUrl: 'remove',
            autoUpload: false
        }

}

那么,如何处理saveUrl和removeUrl以及如何将文件保存到本地路径?

saveUrlremoveUrl是Controller中您的Save / Remove方法或类似方法的路径。

您必须在后端(服务器端)中实现方法,您可以在其中将文件保存在服务器(本地路径)上。

检查或 。