Does anyone have an example of how this is done? Specifically I'm
looking at whether it's worth trying to add a security/xacml+episode (or
security/xacml+series) attachment to our adhoc recordings to be ingested
Currently our adhoc recording plugin makes an API call to Opencast as
soon as the recording is started to create a series with the appropriate
ACL (Opencast accepts a simple JSON for this) which the recording then
inherits when it's processed in Opencast but I'd prefer the ACL to be an
attachment that is part of the media package and gets ingested with it.
I can see there are the following methods in mediapackage.py:
- Appears to only ever be called by tests (and I haven't tried them)
- Doesn't allow for specifying of mime type and various other attachment
- Has a FIXME line "#FIXME merge with add"
- I got a NoneType error when trying to use it:
line 1478, in addAttachmentAsString
File "/usr/lib/python2.7/genericpath.py", line 49, in isdir
st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Looks like self.getURI() returned None here
- This seems to be more useful but it looks like you need to handle the
creation of the attachment file yourself (it doesn't seem to accept a
string and create the file for you..?).
- Seems to work when I tried with this (where security_file is an
absolute path to a file I manually created on disk):
media_package.add(security_file, 'Attachment', 'attachment/source',
Thought I'm assuming now I'd need to work out how to create this
security file per recording (to make it part of the recording in the
repository) and figure out what the content should be...xacml files look
Is there an easier way of doing this?
Multimedia Software Developer
University of Sussex
+44 (0) 1273 873269