REST API - Length of JPG files is missing from json string?
DickMcMullen
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?
Posts: 7934
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
Posts: 21
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
Posts: 44
You probably need to do a full update (some other stuff has probably changed). Its working for me with the latest code.
Posts: 7934
@rak is right -- you have to upgrade everything.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git