AnsweredAssumed Answered

I need to associate files after upload

Question asked by nefurm on Aug 26, 2014
Latest reply on Aug 29, 2014 by kaynezhang
Hello, we are working with a TV channel and they have a special association need. After the upload of a HD video they need to generate a LD version of the video and associate it with the HD video. Also they can have pictures and audio files associated with the HD video.
We already create the video metadata "extracter", a custom model that have a stdVideoModel, a HDVideoModel that extends the stdVideoModel and a LDVideoModel that also extends the stdVideoModel. The HDVideoModel have the following associations:

<association name="video:baixa">
   <title>Video de Baixa</title>
   <source>
      <mandatory>false</mandatory>
      <many>false</many>
   </source>
   <target>
      <class>video:baixa</class>
      <mandatory>false</mandatory>
      <many>false</many>
   </target>
</association>
<association name="video:audio">
   <title>Audios</title>
   <source>
      <mandatory>false</mandatory>
      <many>true</many>
   </source>
   <target>
      <class>audio:audio</class>
      <mandatory>false</mandatory>
      <many>true</many>
   </target>
</association>
<association name="video:exif">
   <title>Fotos</title>
   <source>
      <mandatory>false</mandatory>
      <many>true</many>
   </source>
   <target>
      <class>exif:exif</class>
      <mandatory>false</mandatory>
      <many>true</many>
   </target>
</association>

I thought about creating a custom behavior that associate files by file name. In that case, if my video has the name DDMMYYYYSEP.mov, all files with the same name _id.jpg would be associated as pictures and all files with the same name _id.wav or _id.mp3 would be associated as audio. Is that the right path to follow?

Outcomes