| GitHub Issue | n/a |
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2015-01-21T01:18:28.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | acs, cloud, customobjects, query |
| Reporter | Rodrigo Rosalin Alves Ferreira |
| Assignee | Shuo Liang |
| Created | 2015-01-20T11:34:33.000+0000 |
| Updated | 2016-03-08T07:37:42.000+0000 |
I use the ACS and I'm in trouble recently to get a custom object that has a photo. The photo attribute always returns null, and I have several applications using the same engine and always worked but recently new applications are with this problem.
[~neemo] Can you please provide me your custom object id? and which part of the photo attributes are missing for you?
I get the photo_id attribute but can not access the photo object itself Result. {"menucategory":[{"user_id":"54bd45f208c91e0942175ad9","photo_id":"54bd46da2ed88cabe3004dbb","created_at":"2015-01-19T18:03:07+0000","updated_at":"2015-01-19T18:03:07+0000","title":"Teste1","id":"54bd46da2ed88cabe3004dba","cname":"menucategory"}],"success":true,"error":false,"meta":{"code":200,"status":"ok","method_name":"queryCustomObjects"}} How can I get to the photo along with the custom object in the query? Thanks
[~neemo] can you please pass in response_json_depth=2 to get the photo object?
Just run a simple test to get response from customer query, here is the standard structure.
{ "meta": { "code": 200, "status": "ok", "method_name": "queryCustomObjects", "page": 1, "per_page": 10, "total_pages": 1, "total_results": 1 }, "response": { "test": [ { "created_at": "2015-01-21T00:43:15+0000", "updated_at": "2015-01-21T00:43:15+0000", "photo": { "id": "54bef622c069eb7fa500b558", "filename": "testImage.png", "size": 52484, "md5": "5e7438e831ba84297cc0cdecaa8445dd", "created_at": "2015-01-21T00:43:15+0000", "updated_at": "2015-01-21T00:43:15+0000", "processed": true, "urls": { "square_75": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_square_75.png", "thumb_100": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_thumb_100.png", "small_240": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_small_240.png", "medium_500": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_medium_500.png", "medium_640": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_medium_640.png", "large_1024": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_large_1024.png", "original": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_original.png" }, "content_type": "image/png", . . .It's worked. Thanks very much Wei Kong