Could not find the Controller
这是我的函数,它将返回图像的URL:
'image_url' => array('operations' => array('retrieve' => array(
'help' => t('The resource to retrive the image of the given url/uri.'),
'callback' => '_fieldinsync_image_url_retrieve',
'args' => array(
array(
'name' => 'url',
'optional' => FALSE,
'source' => array('path' => 'url'),
'type' => 'string',
'description' => 'The url/uri of the image.',
)),
'access callback' => 'services_access_menu',
),),),
功能:
function _fieldinsync_image_url_retrieve($imgUrl){
$value;
$value[]=array(
'vname'=> 'session_id',
'sname' => 'session_name');
$value['uri'] = image_style_url('mobile_product_image', $imgUrl);
return $value;
}
Uri是:public://Tab - A2107.jpg
答案 0 :(得分:1)
得到了我的答案
需要在settings.php中添加这些行
$conf['image_allow_insecure_derivatives'] = TRUE;