下面是对象,我的要求是,文件名和它的值应该相同。我们怎么能做到这一点?
const obj = {
email: this.formUser.value.email,
phoneNumber: this.formUser.value.mobile,
profileImageName: file,
fileObj: {
// want the same logo.png to be the key name here
file: {
fileName: file, //value is logo.png
fileDescription: this.formUser.value.fileDescription
}
}
}
慕桂英3389331
相关分类