Browse Source

Attachments using jetty instead of shared netty. Much simpler.

7.x-2.x
Daniel Lamb 9 years ago
parent
commit
0d9d9ca84e
  1. 28
      islandora_basic_image/islandora_basic_image.module

28
islandora_basic_image/islandora_basic_image.module

@ -110,12 +110,24 @@ function islandora_basic_image_node_postinsert($node) {
$node = array_pop($nodes); $node = array_pop($nodes);
// Don't forget the trailing slash. // Set the options for httprl.
httprl_request("http://localhost:8181/islandora/rest/basic-image/{$node->uuid}", $options = array(
array( 'method' => 'POST',
'method' => 'PUT', 'data' => array(
'data' => json_encode($node), 'files' => array(
)); 'node' => array(json_encode($node)),
),
),
);
// Add the obj file to the options if it exists.
$has_obj = isset($_FILES['files']['tmp_name']['obj']);
if ($has_obj) {
$options['data']['files']['obj'] = array($_FILES['files']['tmp_name']['obj']);
}
httprl_request("http://10.0.2.15:8888/islandora/rest/basic-image/?uuid={$node->uuid}",
$options);
$response = httprl_send_request(); $response = httprl_send_request();
} }
@ -153,7 +165,9 @@ function islandora_basic_image_node_postupdate($node) {
); );
} }
httprl_request("http://localhost:8181/islandora/rest/basic-image/$uuid", dd($options);
httprl_request("http://10.0.2.15:8888/islandora/rest/basic-image?uuid={$node->uuid}",
$options); $options);
$response = httprl_send_request(); $response = httprl_send_request();
} }

Loading…
Cancel
Save