One point to be considered is that the task might be recycled in the future and putting your solution online might be regarded as helping unknown future asignees cheating. Whether and to which extent this is an issue depends very much on the nature of the task and, of course, whether you have to expect the task to be recycled at all.
The only comparable case from my own studies were reports from the advanced physics lab course, where every student has been given the same tasks for years. Nontheless, there were quite a few past reports to be found online (mine among them) but stupid copying from them was quite risky as the tutors also were aware of this (and sometimes even were the authors of said old reports). Rather, old reports were often a much better preparation for the course than the actual manuals as the latter were usually didactically awful and at times even incorrect. I even “cited” an old report once or twice because it was the only available source for some crucial information. And even if the manual was good, having a different explanation of the same thing is beneficial to understanding it as it also depends on the reader what is a god explanation for him or her. All in all, I would say that the existence of old reports had a huge positive pedagogical effect on me and others.