brianhorakh / vita

vita source
0 stars 0 forks source link

Edit profile pic doesn't work. You can see the mobile device working, but the app gets stuck at this point. #8

Open inder243 opened 8 years ago

inder243 commented 8 years ago

Unable to edit pofile picture,After updating picture, we are getting this in response: {"success":true,"**sql":"update Users set ProfilePic='2016-05-03/12/.profile-100.jpg' where Id='100'","now":"2016-05-03 05:25:57","ProfilePicFile":"2016-05-03/12/.profile-100.jpg","ProfilePicURL":"http://www.vitatheapp.com/files/2016-05-03/12/.profile-100.jpg"}

brianhorakh commented 8 years ago

Can you please send me the request you are using to update the picture? Thanks!

inder243 commented 8 years ago

2016-05-31-112119_1366x768_scrot

brianhorakh commented 8 years ago

Not sure how else to ask this question. The URL/File in the DB is not valid, so it's not going to work. Can you please send me the API request you are using to upload the profile picture. Thanks!

inder243 commented 8 years ago

We are using this Web service to upload the Profile Pic : http://www.vitatheapp.com/vita-api/UserProfileUpdate?uid=100&authid=F1E78A8C-F63B-11E5-BC59-A7AA58C3F44C&file1=

*We are sending the image encode To Base64String. The Image data is less than 1mb in all cases.

We are getting this response:

Email = "Kavita.r@iapptechnologies.com"; PasswordPlainText = qwerty; PhoneNumber = 56565656655; ProfilePic = "2016-05-31/13/.profile-100.jpg"; ProfilePicURL = "http://www.vitatheapp.com/files/2016-05-31/13/.profile-100.jpg"; Username = Kavi; now = "2016-06-01 22:06:50"; success = 1;

Since the response success = 1,this mean image data is successfully delivered. But We are not able to open the ProfilePicURL. It responding with "404 Not Found".

SeanGuerrero commented 8 years ago

Brian, Please see the error message above.

brianhorakh commented 8 years ago

I can't imagine this would ever possibly work as an HTTP GET since the url would be too large.

I did find a bug when testing, and I was able to upload a file using the following 'curl' command line

curl -v http://www.vitatheapp.com/vita-api/UserProfileUpdate --form uid=100 --form authid=F1E78A8C-F63B-11E5-BC59-A7AA58C3F44C -F ProfilePic=@tests/test.jpg

Please make sure you are using "ProfilePic" instead of "file1" parameter. Thanks!

http://www.vitatheapp.com/files/2016-06-09/23/image.profile-100.jpg

SeanGuerrero commented 8 years ago

Vakul, did you see this from Brian?

inder243 commented 8 years ago

Yes, have seen that and we are already are using the same ProfilePic. But unable to get any image on URL. 2016-06-20-114343_1366x768_scrot

SeanGuerrero commented 8 years ago

Vakul is this an issue that needs to be addressed by Brian?

Brian can you please check this out?

brianhorakh commented 8 years ago

Sean - this is not my issue, I provided a curl example above. They can't upload a file via "GET" they need to use a "POST" -- I think that's the issue.

brianhorakh commented 8 years ago

curl -v http://www.vitatheapp.com/vita-api/UserProfileUpdate --form uid=100 --form authid=F1E78A8C-F63B-11E5-BC59-A7AA58C3F44C -F ProfilePic=@tests/test.jpg

inder243 commented 8 years ago

done