【问题标题】:ionic cordovaFile error "ENCODING_ERR"离子cordovaFile错误“ENCODING_ERR”
【发布时间】:2017-01-03 07:37:34
【问题描述】:

我正在使用 ionic 1 开发社交应用。我需要上传图片和视频。对于图片,一切正常,但无法为视频做同样的事情。这是我的代码:

_self.videoFromDrive = function () { navigator.camera.getPicture(_self.onSuccess, _self.onFail, { 质量:100, 目的地类型:Camera.DestinationType.FILE_URI, 来源类型:Camera.PictureSourceType.PHOTOLIBRARY, 媒体类型:Camera.MediaType.VIDEO }); };

_self.onSuccess = function (videoURL) { _self.selectedVideo = videoURL; _self.dpPic1 = _self.selectedVideo.substring(0, _self.selectedVideo.lastIndexOf('/') + 1); _self.dpPic2 = _self.selectedVideo.substring(_self.selectedVideo.lastIndexOf('/') + 1, _self.selectedVideo.length); };

_self.onFail = 函数(错误){ generalService.toastMessage('错误!Somethenter code hereing 出错了', 'long'); };

我正在使用 $cordovaFile.readAsArrayBuffer(_self.dpPic1, _self.dpPic2) 失败并出现错误

【问题讨论】:

    标签: ionic-framework ngcordova


    【解决方案1】:

    我认为该插件存在问题。为什么不试试呢

    <input type="file" id="file">

    在旧版浏览器 Android 中不支持某些更改。为此,您可能需要 CrossWalk。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-13
      • 1970-01-01
      • 2017-07-12
      • 2019-01-05
      • 1970-01-01
      • 2018-09-27
      • 2017-12-03
      • 2020-05-07
      相关资源
      最近更新 更多