Titanium JIRA Archive
Appcelerator Community (AC)

[AC-383] SDK 5.0.0 error on Ti.Cloud.Users.update

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2015-11-14T01:18:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsandroid
Reporterchris desart
AssigneeShak Hossain
Created2015-09-26T13:07:23.000+0000
Updated2015-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

Comments

  1. Harish Mridha 2015-09-26

    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.

JSON Source