0

I am searching the easiest way to get this done in alfresco: When I upload a document in a specific folder.I want it to give automatically a content type. So I create a rule on a folder =>

In my rule I have to set an action that gives my document a content type. Or I can make a webscript which will do it for me..

I am searching for a start here. I already followed tutorials on ECMArchitect but I can't manage to find a simple solution for this.

So pls experienced people, can you give me a start?

RobinHo
  • 565
  • 1
  • 9
  • 24
  • Content type you mean mime type? Is it PHP? – bagonyi Dec 01 '13 at 18:04
  • really not clear what you are trying to do... can't you parse file extensions to get what you need? And what is it needed for? – charlietfl Dec 01 '13 at 18:11
  • 2
    If you just want to add some set of properties to particular document you can use aspect. there is readily available rule which will bind your custom aspect to document which gets uploaded in your folder. – mitpatoliya Dec 02 '13 at 09:06

1 Answers1

1

You have two obvious ways to do this:

  • The way you propose in your question with a rule that specialises to your content type when new content is added to the folder. To be able to do this you will need a type - subtype declaration in the share forms-config.xml (the same you need to change type in an action)

  • The other way is to create a java behaviour that binds to the create node event and implements logic that do the speicialise type that is needed.

billerby
  • 1,977
  • 12
  • 22