Browse Source

Basic image put, post, get

7.x-2.x
Daniel Lamb 10 years ago
parent
commit
71157f365b
  1. 9
      islandora_basic_image/islandora_basic_image.module

9
islandora_basic_image/islandora_basic_image.module

@ -116,6 +116,7 @@ function islandora_basic_image_node_postinsert($node) {
$options = array( $options = array(
'method' => 'POST', 'method' => 'POST',
'data' => array( 'data' => array(
'mimetype' => $_FILES['files']['type']['obj'],
'node' => json_encode($node), 'node' => json_encode($node),
), ),
); );
@ -130,10 +131,9 @@ function islandora_basic_image_node_postinsert($node) {
); );
} }
httprl_request("http://10.0.2.15:8888/islandora/rest/basic-image/?uuid=$parent_collection", httprl_request("http://10.0.2.15:8181/islandora/rest/basic-image/?uuid=$parent_collection",
$options); $options);
$response = httprl_send_request(); $response = httprl_send_request();
dd($response);
} }
function islandora_basic_image_node_postupdate($node) { function islandora_basic_image_node_postupdate($node) {
@ -156,6 +156,7 @@ function islandora_basic_image_node_postupdate($node) {
$options = array( $options = array(
'method' => 'PUT', 'method' => 'PUT',
'data' => array( 'data' => array(
'mimetype' => $_FILES['files']['type']['obj'],
'node' => json_encode($node), 'node' => json_encode($node),
), ),
); );
@ -170,9 +171,7 @@ function islandora_basic_image_node_postupdate($node) {
); );
} }
dd($options); httprl_request("http://10.0.2.15:8181/islandora/rest/basic-image/?uuid={$node->uuid}",
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