cancel
Showing results for 
Search instead for 
Did you mean: 

email notification in LimitedStreamCopier

nikes
Champ on-the-rise
Champ on-the-rise
Hello,

I have configured alfresco to restrict upload content size limit.

In content-services-context.xml
uncomment :

<property name="contentLimitProvider" ref="defaultContentLimitProvider"/>

in the fileContentStore bean

In alfresco-global.properties,
Add system.content.maximumFileSizeLimit=26214400

Now, I like to send email notification to couple of users, which is not an issue.

Issue is, Email body should contain name of the content user tried to upload.

I don't see any node reference in class "org.alfresco.repo.content.LimitedStreamCopier" (This is where exception is generated).

Please suggest how to fetch nodename in this scenario.


Thanks
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
LimitedStreamCopier is just a simple utility class to copy bytes from an InputStream to an OutputStream,of course it dosen't have any node information,Iit has nothing to do with LimitedStreamCopier.
How can you get node name depends on how you send email,for example if you use freemarker email template,you can use ${document.name} to get current document name.

nikes
Champ on-the-rise
Champ on-the-rise
I am looking for something like "authenticationComponent" by which we get currently loggedin user.

Is there any API which can be used to get noderef from the context?

I see LimitedStreamCopier is the core class being used by all higher level access points (Explorer, Share, Webdav, etc..) , So want to add email notification code in LimitedStreamCopier only.

Or still any other way?