Expand my Community achievements bar.

SOLVED

FileName and Extension on MetadataSchema

Avatar

Level 6

Hi,

I have a requirement to display the filename and the extension on the metadata schema.

I was using these:

  • jcr:content/cq:name - for the filename
  • ./jcr:content/metadata/dam:Fileformat: For the extension

The problem is those values are not consistent for all assets.

For File Name, I noticed this property is filled only when we set the dc:title in the Metadata, after that it fills this field. The problem is, it is not filled for all assets. For some formats it is not filled, for example, for PNG it works for a .doc it doesn't.

The same happens for dam:FileFormat, for some file formats it is filled for other it is not.

Is this working as it was designed for?

In case it is not always filled, there would be a way to use the node name in the metadata schema as the asset node name is the file name?

Or any other alternative?

Any inputs are welcome.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 8

Sounds like you may want to customize the workflow process for adding/updating DAM assets.  You could have a custom workflow step added to the OOTB workflow process that extracts the extension and stores the data on the node, you'd then be able to add this to your metadata schema.

View solution in original post

5 Replies

Avatar

Correct answer by
Level 8

Sounds like you may want to customize the workflow process for adding/updating DAM assets.  You could have a custom workflow step added to the OOTB workflow process that extracts the extension and stores the data on the node, you'd then be able to add this to your metadata schema.

Avatar

Level 6

hi @leeasling,

That's what I was thinking to do.

Thanks for the tip, I'll create a custom step to set the cq:name and dam:FileFormat.

Thanks

Avatar

Level 9

Hi,

"dc:format" attribute is the common attribute in all digital assets. So, Can it be used in your case?. I would not prefer to create "dam:FileFormat" on every asset. And, By the way, Are you planning to determine DAM file format of the asset before creating this attribute?.

---

Jitendra

franciscoribeir wrote...

hi @leeasling,

That's what I was thinking to do.

Thanks for the tip, I'll create a custom step to set the cq:name and dam:FileFormat.

Thanks

 

Avatar

Level 6

Hi @Jitendra,

I'm going to fill dam:Fileformat with the file extension, that I can get from the filename.

Do you think this could cause problem?

Thanks.

Avatar

Level 9

Well,

If there is no such attribute, then you are going to create it. And my point is that we should use dc:Format if we can rather than creating it. Just putting my thought. Can't really say if that could cause some problem.

--

Jitendra