Topics

Tribe Support

Tribe Support's Topics

Akgora Flip

Akgora Flip

May 17 2020

Any one able to edit avatar from reactjs

Dear Ppl,

i was trying to edit avatar from client reactJs + ionic  mobile and on android device.

here the end point is 

End - point  - http://fiti2.v2code.xyz/people/2.json?edit=avatar  

Method is Post 

as a super admin

potrait - data:image/jpeg;base64, /jjjjjjahsdjafg data..... 

I get the following

{"code":401,"message":"Action Edit Not Allowed"}

though I am logged in to my mobile app. 

can you please guide me where am i doing wrong.. 

Thanks In Advance 

and Best Regards

Can you edit the avatar from the React App on the same setup?
Also is content-type multipart/form-data ?
Can you edit the avatar from the React App on the same setup? - yes
Also is content-type multipart/form-data ? Yes.
I am checking on my server side.
one question do we need to send any token to validate the session?
Can your mobile app hold sessions? Check every bit of information that the React App sends to the back-end and compare it with your mobile app's request.
I doubt the same and i am working on it.
Thanks for your time Rastin.
PS: did you get any time to add the mobile number feilds to the DB
Rastin Mehr liked this
I am working on the locations tag in the React App. After that, I'll look into adding the phone number fields.
Akgora Flip liked this
Great Thanks a lot
Hi Rastin
Fixed the issue ,
The issue was with the blob file.
converted the file to blob in srcapiavatar.js and is fixed

let blob = await fetch(file).then(r=>r.blob());
formData.append('portrait', blob, 'file1.jpg');

Powered by Anahita