Does anyone have any idea why the binary object solution pack would be appending ".bin" to all object downloads? This isn't exactly helpful as we generally want to serve binary objects with the same extension that they were uploaded with, but I suspect it might not actually be the intended behavior as I can't find it anything in the module code that would plausibly be doing this.
Thanks!
Datastream tokens | Tokens for islandora relating to datastreams objects. | |
Datastream's ID | [dsfilename:id] | Datastream ID. |
Datastream's label | [dsfilename:ds-label] | Datastream label. |
Extension from Datastream's Mimetype | [dsfilename:fileextension] | File extension derived from mimetype. |
Fedora object PID | [dsfilename:pid] | Full PID of object in Fedora repository. |
Fedora object label | [dsfilename:label] | Fedora object label. |
Fedora object namespace | [dsfilename:namespace] | Fedora object namespace. |
Fedora short PID | [dsfilename:shortpid] | Fedora object pid without namespace. |
University of Pittsburgh | University Library System
1. Use DROID to evaluate file
2. DROID returns PUID, ex: fmt/803
3. Access http://www.nationalarchives.gov.uk/pronom/fmt/803
4. Scrape: <input type='hidden' name='strFileFormatID' value='1603' />
5. Save as XML:
curl -F strAction='Save As XML' -F strFileFormatID=1603 http://www.nationalarchives.gov.uk/PRONOM/Format/proFormatDetailListAction.aspx
6. Get file extension:
<ExternalSignature>
<ExternalSignatureID>1696</ExternalSignatureID>
<Signature>e01</Signature>
<SignatureType>File extension</SignatureType>
</ExternalSignature>
7. Get mime-type:
<FileFormatIdentifier>
<Identifier>application/encase</Identifier>
<IdentifierType>MIME</IdentifierType>
</FileFormatIdentifier>
Brad
$extension = '.' . islandora_get_extension_for_mimetype($datastream->mimetype);
// Prevent adding on a duplicate extension.
$label = $datastream->label;
$extension_length = strlen($extension);
$duplicate_extension_position = strlen($label) > $extension_length ?
strripos($label, $extension, -$extension_length) :
FALSE;
$filename = $label;
if ($duplicate_extension_position === FALSE) {
$filename .= $extension;
}