-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete specific attachments before save issue or comment #196
Comments
What do you think about digest? Can I use it as indentificator for specific attachments? It looks it can work... |
I'm ruby beginner, but how said Jan Amos Komensky:"Learn, learn, learn." I try some script in console and this is my start point: May be I can start like this? Any ideas? @picman |
It has said Lenin. |
Hi David, Set the observable object to "Issue Attachments": Use the below code in AFTER SAVE. You can modify the file size limit by changing it in this section: "< 200.to_i.kilobytes".
I hope its help! |
Hi, I turn back to this problem. I applied your solution and on the first test looks good, but. If I send with company logo another attachment this script delete it also. So I think about solution and here is my idea.
The point of this is delete after save company logo which is always the same, ale slowly take some disc space... What do you think about it? Thanks. David |
I cannot imagine how a logo < 200kB, although saved many time, can noticeably consume the disk space. I'd enlarge the disk space rather than implement such a hack. |
And as not to make many issuses, it will be nice to have more examples for users like me, that not good in Ruby or so ) |
Hi,
i try long time to find solution, how delete specific attachmets before save issues or comments.
Reason is simple. I use email as the one of the ways how create or comment issues. And emails usually have some logo (like corporation logo, etc.) and I have database full of logos. :-)
I think it will be quite easy to manage it, but I don't see light in the end of tunnel now. I know size of file on disk or size in px...
Someone to help? :-)
The text was updated successfully, but these errors were encountered: