REST API - Length of JPG files is missing from json string?

DickMcMullen
DickMcMullen's picture

Joined: 2010-08-17
Posts: 21
Posted: Wed, 2010-09-08 04:58

I am using the REST API from java, and it is working well. I am getting all of the data elements I expected on an image retrieval (a .jpg file) except I can't find a file size (length). Is it right under my nose?

-- Dick

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7934
Posted: Wed, 2010-09-08 05:24

Nope, it isn't there.

.. time passes ..

Ok, now it's there. Get the latest code :-)
https://sourceforge.net/apps/trac/gallery/ticket/1347
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
DickMcMullen
DickMcMullen's picture

Joined: 2010-08-17
Posts: 21
Posted: Wed, 2010-09-08 13:53

Thanks - I copied this file (via the GIT raw view) and installed it. I am now getting an HTTP 400 bad request:

2010-09-08 06:21:57 -07:00 --- error: Rest_Exception [ 400 ]: Bad Request
/hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/modules/rest/helpers/rest.php [ 121 ]
#0 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/modules/gallery/models/item.php(999): rest_Core::url('data', Object(Item_Model), 'thumb')
#1 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/modules/gallery/helpers/item_rest.php(83): Item_Model->as_restful_array()
#2 [internal function]: item_rest_Core::get(Object(stdClass))
#3 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/modules/rest/controllers/rest.php(83): call_user_func(Array, Object(stdClass))
#4 [internal function]: Rest_Controller->__call('item', Array)
#5 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Rest_Controller), Array)
#6 [internal function]: Kohana_Core::instance(NULL)
#7 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#8 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#9 /hermes/web05/b1396/moo.stillwatermcmullensn/gallery3/index.php(94): require('/hermes/web05/b...')
#10 {main}

-- Dick

 
rak

Joined: 2010-08-09
Posts: 44
Posted: Wed, 2010-09-08 15:21

You probably need to do a full update (some other stuff has probably changed). Its working for me with the latest code.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7934
Posted: Thu, 2010-09-09 02:11

@rak is right -- you have to upgrade everything.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git