角和文件上传

编程入门 行业动态 更新时间:2024-10-22 15:34:19
本文介绍了角和文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有这种情况。请上传具有角上传文件文件的请求:

I have this situation. Make a request to upload file with angular-upload-file:

var onBeforeUploadItem = function(item) { item.formData.push({test:'test'}); }; var _emptyQueue = function(){ $scope.uploader.clearQueue(); $scope.uploader.formData = []; }; var onAfterAddingAll = function(addedFileItems) { $scope.uploader.uploadAll(); }; var _initUploader = function(){ $scope.uploader = new FileUploader({ url: (restServiceUrl), isHTML5 : true }); $scope.uploader.onBeforeUploadItem = onBeforeUploadItem; $scope.uploader.onAfterAddingAll = onAfterAddingAll; _emptyQueue(); };

请求包含文件,但列表项= upload.parseRequest(service.getHttpServletRequest())是空的。帮我! :)

The request contain the file but List items = upload.parseRequest(service.getHttpServletRequest()) is empty. Help me! :)

推荐答案

伍输入文件是不允许使用的NG-模式。

Ng input file is not allowed for use ng-model.

不提供的所有功能适用于所有输入类型。具体来说,数据绑定和事件通过NG-处理模式不支持输入[文件]

Not every feature offered is available for all input types. Specifically, data binding and event handling via ng-model is unsupported for input[file].

详细。

您可以采取的文件路径并与jQuery文件上传功能的使用。

You can take file path and use with Jquery File Upload functions.

这将帮助你:文件上传使用AngularJS

更多推荐

角和文件上传

本文发布于:2023-10-11 22:46:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483054.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件上传

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!