Hello Heike

Ah well, you are right regarding the text and image component. Since this is 
using the LinkFieldDefinition it is not using the configuration from the assets 
app.

What you could do is either: 
Replace the direct upload action. You were following the correct path with 
replacing the implementation of DirectUploadActionDefinition (under 
/modules/dam-app/apps/assets/chooseDialog/actions/upload ). You could go about 
this in two ways as well:
1) Just replace the implementation with your own class by extending the default 
class info.magnolia.dam.app.assets.action.DirectUploadAction with one that 
contains your logic and adding a property called “implementationClass” linking 
to your implementation under the chooseDialog path mentioned above.
2) If you want to make it configurable via UI then you might want to extend 
DirectUploadActionDefinition to be able to add/change a regexp pattern in the 
UI already and do your custom implementation class based on that. 


Or alternatively you could remove the whole chooseDialog definition under 
/modules/dam-app/apps/assets/chooseDialog. This will get rid of the custom 
dialog and its actions and simply display the default chooser where you cannot 
upload into DAM directly, but only choose. Attention this affects all apps that 
have any kind of linkField pointing to DAM.

IMHO, the second solution from the first approach would be the most preferable 
and maintainable way to do this.

Hope this helps a bit
Natascha

PS: Since you mentioned it: generally it helps looking into the class to find 
its default implementation. For example, if you look into 
info.magnolia.dam.app.assets.action.DirectUploadActionDefinition you will see 
that the implementation class is actually set in the constructor (adding a 
property called “implementationClass” can override this on each field 
definition!)
[code]
public DirectUploadActionDefinition() {
    setImplementationClass(DirectUploadAction.class);
}
[/code]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=1b8bcf0a-52e0-43c9-b304-987115ba06b2


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to