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
Item14055: recalculate filesize after beforeUploadHandler #8
Conversation
Hi, Thanks for the patch. It would be helpful if when you encounter a bug, you could open a task on https://foswiki.org/Tasks so that we can track it for inclusion into an upcoming release. Please describe the symptoms of what the patch fixes, (What are the symptoms of the incorrect filesize), and use the assigned Item number in the commit log summary. ie, something like: This way, it gets pulled into the release notes, and the commits are tracked against the bug report. Thanks, |
OK, thanks for the info. |
Plugins can modify the file/stream's content of uploaded/attached files(according to the API docu in Foswiki::Plugins::EmptyPlugin). Hence, we need to recalculate the filesize after the handler(s) have been called.
By the way, I guess we have a bit of a hole in our development process. When you pseudo-install a git checkout of the foswiki/distro repository, you should be getting "commit" and "comment" git hooks installed locally which will validate you commits. These hooks perform a couple of functions:
I guess we don't install the hooks automatically in a "forked" repository. We'll need to look into that. The hooks are in |
Merget in to master, and cherry-picked into Release02x01 for the 2.1.1 release. Thanks |
The hooks are installed. I tried again with a dummy commit in a local branch (of my forked repo). Now I do get the "ERROR: ...something... is not tidy; cannot check in:", the "No Bug item in log message" as well as the "Item99999999 does not exist" messages. I'm not sure why I didn't get it before. |
Mysteries ... I've run a tidy, everything is merged, unit tests still pass, and task is waiting for release in 2.1.1, which should happen soon. |
Thanks. I've tested it again and my tidy reports the same stuff you've now tidied. I known now what has happened (and reproduced it with a new clean clone). I've added github.com/foswiki/distro as a remote (git remote add upstream https://github.com/foswiki/distro.git) and then pseudo-installed something else. That has added the hooks:
|
Plugins can modify the file/stream's content of uploaded/attached files (according to the API docu in Foswiki::Plugins::EmptyPlugin). Hence, we need to recalculate the filesize after the handler(s) have been called.