Hi Jaime
This feature is available in Fedora 3.3 onwards, but please note the bug in
Fedora 3.3 -
<https://jira.duraspace.org/browse/FCREPO-703>
https://jira.duraspace.org/browse/FCREPO-703 - if you have API-A
authentication turned *off* you will hit this bug. This is fixed in Fedora
3.4. With Fedora 3.3 you can only effectively use the Datastream ID to
define the filename, you cannot use the datastream label or a relationship
in RELS-INT.
Perhaps some examples will help for the filename.ext to be used when you
download the datastream.
Example 1:
- Use the Datastream ID as the filename
- use the MIMETYPE to look up the extension (from mime-to-extensions.xml)
param name="datastreamFilenameSource" value="id" - means use the datastream
ID for the filename
param name="datastreamExtensionMappingId" value="always" - means look up the
fiilename in name-to-extensions.xml based on the MIMETYPE
For DC, with a datastream MIMETYPE of text/xml, this will be downloaded as:
DC.xml
For a datastream "IMAGE" with a MIMETYPE of image/jpeg, this will be
downloaded as
IMAGE.jpg
Example 2:
- Use the Datastream Label as the filename
- If there is no Datastream Label, use the Datastream ID
- Look up the extension in both cases from mime-to-extensions.xml based on
the MIMETYPE
param name="datastreamFilenameSource" value="label id" - use the datastream
label as the filename if present, if not then use the ID
param name="datastreamExtensionMappingId" value="always" - use the MIMETYPE
to determine the extension if the filename came from the label
param name="datastreamExtensionMappingLabel" value="always" - use the
MIMETYPE to determine the extension if the filename came from the ID
Example 3:
- Specify the full filename *and* extension in RELS-INT using the
relationship info:fedora/fedora-system:def/model#downloadFilename
- If there is nothing specified in RELS-INT for this datastream, use the
Datstream ID for the name and the MIMETYPE to generate the extension
param name="datastreamFilenameSource" value="rels id"
param name="datastreamExtensionMappingRels" value="never"
param name="datastreamExtensionMappingId" value="always"
For the cases where the MIMETYPE is not recognised (ie not specified in
mime-to-extensions.xml", you can also specify the following so that if the
MIMETYPE is not found in mime-to-extensions.xml the default value ".bin" (or
whatever you specify) will be used:
param name="datastramDefaultExtension" value="bin"
Hope that helps. There are many different configuration combinations
depending on what you want to achieve.
Regards
Steve
-----Original Message-----
From: Jaime Sastre Tomás [mailto:[email protected]]
Sent: 08 September 2010 14:30
To: [email protected]
Subject: [fcrepo-user] General doubt with fedora commons
I need to solve a problem with my fedora commons system.
We need to achieve saving the files in fedora commons with extension.
Nowadays files are saved with extension .0 and we need the extension file
.jpeg for example.
Is is possible to do it?
I know that is an option of configuration file fedora.fcgf, isn't it?
But we don't know the correct way to do it. We save datastreams DC,
RELS-EXT, and image, but we don't know the correct values of the following
parameters to achieve our goal:
datastreamFilenamesource
datastreamExtensionMappingLabel
datastreamExtensionMappingId
datastreamExtensionMappingRels
datastreamExtensionMappingDefault
datastreamDefaultfilename
datastreamDefaultExtension
Thanks a lot of our aportations.
Regards
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users