[AC-383] SDK 5.0.0 error on Ti.Cloud.Users.update
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2015-11-14T01:18:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules |
Labels | android |
Reporter | chris desart |
Assignee | Shak Hossain |
Created | 2015-09-26T13:07:23.000+0000 |
Updated | 2015-11-14T01:18:28.000+0000 |
Description
ArrowDB user created with SDK 4.1.1
Upgraded to SDK 5.0.0
On calling Ti.Cloud.Users.update to update user photo object
var updateJSON = {
password : Alloy.Globals.User.password,
password_confirmation : Alloy.Globals.User.password,
email : Alloy.Globals.User.email,
photo: Alloy.Globals.myBlob,
"photo_sizes[preview]" : "64x64#",
"photo_sync_sizes[]" : "preview",
};
Cloud.Users.update(updateJSON, function (e) {
if (e.success) {}
});
Error is thrown:
Error: Failed to upload photo:
Cannot serialize an object of class ActionDispatch::Http::UploadedFIle into BSON
Not tested on iOS.
As a conseguence (this happen always on file upload error) User photo object become blocked. Also operating on dashboard when trying add a new photo an error is thrown: can't destroy nil
ArrowDB applications no longer create the default photo sizes. Only the original photo size is shown. To create customized photo sizes when creating or updating a photo, see the [Photo Uploading & Resizing](http://docs.appcelerator.com/arrowdb/latest/#!/guide/photosizes) guide. For User-defined photo sizes, see Photo Uploading & Resizings guide. Size can be specified as a JSON object, or using a separate parameter for each size. To specify a photo size, call "preview" using JSON.