You are here: Foswiki>Tasks Web>Item4966 (25 Jan 2009, ArthurClemens)Edit Attach
In PersonalInfoAddOn: when using Change Picture and uploading a file, the filename was somehow set to %FILENAME% and then sanitised to FILENAME. I tracked the problem to use of view rather than attach on the Upload a New Picture link in PersonInfoPictureViewTemplate. I changed:
href="%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?template=PersonalInfoPictureUploadView">%MAKETEXT{"Upload a new one"}%</a></div><!--/piUploadNew-->%TMPL:END%
to
href="%SCRIPTURL{attach}%/%BASEWEB%/%BASETOPIC%?template=PersonalInfoPictureUploadView">%MAKETEXT{"Upload a new one"}%</a></div><!--/piUploadNew-->%TMPL:END%

but Attach.pm did not notice the template parameter. I made a trial fix, changing
        $tmpl = $session->templates->readTemplate( 'attachnew', $skin );
to
        $tmpl = $session->templates->readTemplate($query->param( 'template' ) ||  'attachnew', $skin );
It worked, but I't's not a complete fix and I don't know whether attach should honour template parameters.

And I'm sorry if I should have reported this elsewhere. Just let me know.

-- TWiki:Main/JohnMurphy - 14 Nov 2007

I don't see that bug with Foswiki.

-- ArthurClemens - 25 Jan 2009

ItemTemplate edit

Summary PersonalInfoAddOn - change picture upload - filename is always REGISTER
ReportedBy TWiki:Main.JohnMurphy
Codebase
SVN Range
AppliesTo Extension
Component PersonalInfoAddOn
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease minor
ReleasedIn
Topic revision: r3 - 25 Jan 2009, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy