trac-users  

Re: [Trac] Silently decline to attach duplicate file

Chris Heller
Thu, 11 Mar 2010 13:09:33 -0800

Take a look at the IAttachmentManipulator interface.  Specifically,  the
validate_attachment method will give you the opportunity to reject an
attachment, although it won't do it silently.

If you _really_ wanted to do it silently (which doesn't seem user-friendly
to me) ,  then you'd need to look into modifying trac/attachment.py where it
actually calls validate_attachment.

2010/3/11 Александр Зайцев <beb...@gmail.com>

> Hi,
>
> I would like to configure the system that it will decline to attach the
> same file to the ticket. Currently it adds some suffix like (2) (e.g.
> attach_file.jpg, attach_file(2).jpg).
> Is there any way to do that comparision comparing either file name or file
> content (better option)?
>
> Alex.
>
>
> --
> Александр Анатольевич Зайцев
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to trac-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> trac-users+unsubscr...@googlegroups.com<trac-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.