cancel
Showing results for 
Search instead for 
Did you mean: 

Accept only some kind of content types

xmaniac
Champ in-the-making
Champ in-the-making
I just need to cancel all binary file uploads to a workspace that are not images (checking the mime) or OGG videos (checking the .ogg extension). It must be easy to do (easier than creating a custom action, I mean). But I can't really see how to do it. Is it possible?
5 REPLIES 5

sselvan
Champ in-the-making
Champ in-the-making
One way to implement this could be - create a content rule based on mime-type and execute a script, which is kind of equivalent to that of your "custom action" thought. I could not think of anything else out of the box to do this.

zaizi
Champ in-the-making
Champ in-the-making
1. Create a javascript file with the following link;

document.remove();
2. Upload it to Data Dictionary -> Scripts.
3. Configure content rule to run this script for all content not of you required type.

xmaniac
Champ in-the-making
Champ in-the-making
A custom action is http://wiki.alfresco.com/wiki/Custom_Actions. What would be a script in this case? AFAIK web scripts are limited to URL request, isn't it?

xmaniac
Champ in-the-making
Champ in-the-making
A custom action is http://wiki.alfresco.com/wiki/Custom_Actions. What would be a script in this case? AFAIK web scripts are limited to URL request, isn't it?
yay! got it! thank you! I didn't notice there was an action to run scripts  Smiley Surprisedops:

xmaniac
Champ in-the-making
Champ in-the-making
1. Create a javascript file with the following link;

document.remove();
The code raises an exception though:

org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/55b53463-a0b3-479d-af36-e51085f8fa7c