Steps to Reproduce
(All tests done on same user
The standard Cloud.Users.update method of updating a user's photo was confirmed, installed the app on ipad and confirmed again.
Continued testing from laptop for MobileWeb portion of the app with this,
http://developer.appcelerator.com/question/182699/cloudusersupdate-photo-returns-success-but-no-change-wrong-media-type , resulted in error "Failed to upload photo: Failed to indentify photo file" or depending upon my sent data, silently failed when changing reader.readAsDataURL() to reader.readAsBinaryString() and various methods from this reference
http://www.html5rocks.com/en/tutorials/file/dndfiles until I started getting consistent error responses 'failed to upload photo: undefined method
destroy' for nil:NilClass'
I returned to the device to test with working, unchanged installed app and got the same error same response, 'failed to upload photo: undefined method
destroy' for nil:NilClass'
Tested from dashboard, same error response
(All tests done on same user)
Actual Result
Existing user's photo deleted but not replaced. Unable to update
Expected Result
successful update
[~keylo] you mind sharing a test case with us? So far we can not reproduce this issue Thanks
Everything is in the link I posted http://developer.appcelerator.com/question/182699/cloudusersupdate-photo-returns-success-but-no-change-wrong-media-type and description above. Started with a working Cloud.Users.update method, which you can reproduce without my help, then did what the link states, changing reader.readAsDataURL() to reader.readAsBinaryString(), reader.readAsText(), reader.readAsArrayBuffer(), sometimes passing update the result.data as well as the result until it breaks. It might have taken 10 or 20 tries before shutting down. I may have also tried passing handleFileSelect's evt[0] (file) directly from the without passing it through the reader. Returned to the working update method to confirm
[~morahman] Did you try from dashboard?
"Tested from dashboard, same error response"
[~keylo] we also have tested from the dashboard and it works, if it shows error it may cause of large file so just try it again. And this test case User photo is updated properly. So first check your webView chooseing image getting the titanium code.
Thanks.
Titanium.Filesystem.getFile('KS_nav_views.png') would not work in the scenario described as the need was to browse to a file in a MobileWeb app, thus the WebView HTML solution, which broke the system.
[~keylo] can you please attach a runnable test case that reproduces the issue? So far we can not replicate the issue