regression: use correct parameters on upload image on profile view (#5620)
This commit is contained in:
parent
afe50aed7e
commit
3fe24fac7b
|
@ -138,11 +138,13 @@ const ChangeAvatarView = () => {
|
||||||
cropperAvoidEmptySpaceAroundImage: false,
|
cropperAvoidEmptySpaceAroundImage: false,
|
||||||
cropperChooseText: I18n.t('Choose'),
|
cropperChooseText: I18n.t('Choose'),
|
||||||
cropperCancelText: I18n.t('Cancel'),
|
cropperCancelText: I18n.t('Cancel'),
|
||||||
includeBase64: true,
|
includeBase64: true
|
||||||
useFrontCamera: isCam
|
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const response: Image = isCam === true ? await ImagePicker.openCamera(options) : await ImagePicker.openPicker(options);
|
const response: Image =
|
||||||
|
isCam === true
|
||||||
|
? await ImagePicker.openCamera({ ...options, useFrontCamera: true })
|
||||||
|
: await ImagePicker.openPicker(options);
|
||||||
dispatchAvatar({
|
dispatchAvatar({
|
||||||
type: AvatarStateActions.CHANGE_AVATAR,
|
type: AvatarStateActions.CHANGE_AVATAR,
|
||||||
payload: { url: response.path, data: `data:image/jpeg;base64,${response.data}`, service: 'upload' }
|
payload: { url: response.path, data: `data:image/jpeg;base64,${response.data}`, service: 'upload' }
|
||||||
|
|
Loading…
Reference in New Issue