Browse Source

Change so that modify_datastream_by_reference attempts to access a file via HTTP and not HTTPS. Previously the file could not be accessed.

pull/150/head
Jordan Dukart 13 years ago
parent
commit
325e326cee
  1. 8
      api/fedora_item.inc

8
api/fedora_item.inc

@ -1068,6 +1068,14 @@ RDF;
* @return type
*/
function modify_datastream_by_reference($external_url, $dsid, $label, $mime_type, $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) {
global $base_url;
// Fedora has some problems getting files from HTTPS connections sometimes, so if we are getting a file
// from the local drupal, we try to pass a HTTP url instead of a HTTPS one.
if(stripos($external_url, 'https://') !== FALSE && stripos($external_url, $base_url) !== FALSE) {
$external_url = str_ireplace('https://', 'http://', $external_url);
}
$params = array(
'pid' => $this->pid,
'dsID' => $dsid,

Loading…
Cancel
Save