angularJSfile-up-load上传图片-创新互联
创新互联建站总部坐落于成都市区,致力网站建设服务有成都网站设计、网站建设、网络营销策划、网页设计、网站维护、公众号搭建、成都小程序开发、软件开发等为企业提供一整套的信息化建设解决方案。创造真正意义上的网站建设,为互联网品牌在互动行销领域创造价值而不懈努力!
//新增系统-开始出现弹窗
$scope.addSystem = function(){
$scope.YESs = t2;
$scope.YES = t1;
$scope.NO = t2;
$scope.p_w_picpathSrc = "";
$('#fileItem').val("");
// $scope.createUser_add = $scope.LoginList.employeeName
}
//新增系统-重新选择
$scope.chooseAgain = function(){
$scope.YES = t1;
$scope.YESs = t2;
$scope.NO = t2;
$scope.fileItem = null;
$scope.p_w_picpathSrc = false;
}
//新增系统-上传图片预览
$scope.getFile = function () {
fileReader.readAsDataUrl($scope.file, $scope)
.then(function(result) {
$scope.sysImagePc_edit = result;
$scope.YESs = t1;
$scope.sysImagePc_edit = result;
$scope.p_w_picpathSrc = result;
$scope.fileItem = $scope.file;
});
};
//新增系统-点击上传
$scope.uploadStatus = false;
var uploader = $scope.uploader = new FileUploader({
url: '/FileServlet',
queueLimit: 1,
removeAfterUpload: true
});
uploader.onAfterAddingFile = function(fileItem) {
$scope.fileItem = fileItem._file;
};
uploader.onSuccessItem = function(fileItem, response, status, headers) {
$scope.uploadStatus = true;
$scope.sysImagePc_add = response;
$scope.sysImagePc_edit = response;
$scope.YESs = t2;
$scope.YES = t2;
$scope.NO = t1;
};
$scope.UploadFile = function(){
uploader.uploadAll();
};
//新增产品-选择图片--取消
$scope.EditloadFile = function(){
$scope.YES = t1;
$scope.YESs = t2;
$scope.NO = t2;
$('#fileItem').val("");
$scope.fileItem = $scope.sysImagePc_edit;
};
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享名称:angularJSfile-up-load上传图片-创新互联
本文路径:http://myzitong.com/article/ipsjj.html