代码如下

var avFile2 = new AV.File('headimg.jpg', {base64:result});
avFile2.save().then(function(obj) {
    // 数据保存成功
    currentUser.set('headimg', obj.url());
    currentUser.save().then(function (todo) {
        this.refresh();
        console.log('objectId is ' + todo);
    }, function (error) {
        console.log(error);
    });
    console.log(obj.url());
}, function(error) {
    // 数据保存失败
    console.log(error);
});

错误日志

TypeError: One of the sources for assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.
    at Object.assign (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:289:7)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:30620:8
    at Array.map (native)
    at FormData.getParts (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:30604:20)
    at getParts (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:30532:13)
    at RCTNetworking.sendRequest (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:30506:36)
    at XMLHttpRequest.send (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:30378:15)
    at Request.end (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:84634:5)
    at upload (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:88566:5)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:88422:15

执行到avFile2.save().then(function(obj) 时出现此问题,{base64:result} 是正确的,加上'data:image/jpeg;base64,' 前缀可以解析成图片

急,求解,在线等!

我也碰到了,改用路径的方式上传了,但是还是碰到bug