From 71157f365bed00998b318de25f7427f33b78b8c6 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Thu, 30 Jul 2015 02:20:54 +0000 Subject: [PATCH] Basic image put, post, get --- islandora_basic_image/islandora_basic_image.module | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 31ac33fb..1e05dbc7 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -116,6 +116,7 @@ function islandora_basic_image_node_postinsert($node) { $options = array( 'method' => 'POST', 'data' => array( + 'mimetype' => $_FILES['files']['type']['obj'], '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); $response = httprl_send_request(); - dd($response); } function islandora_basic_image_node_postupdate($node) { @@ -156,6 +156,7 @@ function islandora_basic_image_node_postupdate($node) { $options = array( 'method' => 'PUT', 'data' => array( + 'mimetype' => $_FILES['files']['type']['obj'], 'node' => json_encode($node), ), ); @@ -170,9 +171,7 @@ function islandora_basic_image_node_postupdate($node) { ); } - dd($options); - - httprl_request("http://10.0.2.15:8888/islandora/rest/basic-image/?uuid={$node->uuid}", + httprl_request("http://10.0.2.15:8181/islandora/rest/basic-image/?uuid={$node->uuid}", $options); $response = httprl_send_request(); }