File upload with REST Error

keithschm

Joined: 2009-08-08
Posts: 5
Posted: Fri, 2012-01-20 12:45

I am trying to upload a file Using Rest. I am using the Gallery3.php functions from GIT. When I try to upload I get:

Fatal error: Uncaught exception 'Gallery3_Exception' with message '{"errors":{"file":{}}}' in /var/www/gallery/uploader/classes/Gallery3.php:244 Stack trace: #0 /var/www/gallery/uploader/classes/Gallery3.php(184): Gallery3_Helper_HTTP_Request->request('post', 'http://xxxxxxx...', 'a6f70b3b24dd9a5...', Array, Resource id #12) #1 /var/www/gallery/uploader/classes/Gallery3.php(119): Gallery3_Helper::request('post', 'http://xxxxxx...', 'a6f70b3b24dd9a5...', Array, Resource id #12) #2 /var/www/gallery/uploader/post.php(24): Gallery3->create('http://xxxxx...', 'a6f70b3b24dd9a5...') #3 {main} thrown in
/var/www/gallery/uploader/classes/Gallery3.php on line 244

In the log I see
2012-01-20 06:39:08 -05:00 --- error: Rest_Exception [ 400 ]: Bad Request
/var/www/gallery/modules/gallery/helpers/item_rest.php [ 171 ]
#0 [internal function]: item_rest_Core::post(Object(stdClass))
#1 /var/www/gallery/modules/rest/controllers/rest.php(104): call_user_func(Array, Object(stdClass))
#2 [internal function]: Rest_Controller->__call('item', Array)
#3 /var/www/gallery/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Rest_Controller), Array)
#4 [internal function]: Kohana_Core::instance(NULL)
#5 /var/www/gallery/system/core/Event.php(208): call_user_func_array(Array, Array)
#6 /var/www/gallery/application/Bootstrap.php(67): Event_Core::run('system.execute')
#7 /var/www/gallery/index.php(97): require('/var/www/galler...')
#8 {main}
2012-01-20 06:39:08 -05:00 --- error: Missing messages entry kohana/core.errors.400 for message kohana/core
2012-01-20 06:39:08 -05:00 --- error: Rest error details: Array
(
[errors] => Array
(
[file] => SafeString Object
(
[_raw_string:private] => Upload failed
[_is_safe_html:protected] => 1
)

)

)

I am not sure what the issue is. Thanks