【发布时间】:2020-02-16 04:04:06
【问题描述】:
我正在尝试使用 cordova 相机插件更新 firebase 个人资料图片。但我有一个错误。请问有什么办法吗?
async openLibrary() {
const options: CameraOptions = {
quality: 70,
destinationType: this.camera.DestinationType.DATA_URL,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
encodingType: this.camera.EncodingType.JPEG,
saveToPhotoAlbum: false
};
return await this.camera.getPicture(options);
}
async addPhoto() {
const libraryImage = await this.openLibrary();
this.photoCamera = 'data:image/jpeg;base64,' + libraryImage;
}
enregisterPseudoo() {
this.user.updateProfile({
displayName: this.pseudo,
photoURL:(this.photoCamera)
}).then(data => {
this.navCtrl.push(TabsPage, {
name: this.pseudo,
photo:(this.photoCamera),
});
});
}
网址太长了,请问有什么办法吗?
【问题讨论】:
-
你能补充一下错误是什么吗?
-
@yazantahhan 这是错误:错误 N 代码:“auth/internal-error”消息:“照片 URL 太长。”原型N
标签: javascript firebase ionic-framework firebase-authentication