Tags:
create new tag
, view all tags

Feature Proposal: Set form field on file upload (to select profile picture)

Motivation

For the MoreVisualUserHomepages feature we need an easy way to update profile pictures. The profile picture name is recorded in a form field name called "Image". For ease of use, this form field should be automatically updated when attaching a profile picture.

Description and Documentation

This features supports a new updatefield parameter to the upload script. If set and if the value matches the name of a form field, it will update that form field with the name of the uploaded file.

Examples

<form name="main" enctype="multipart/form-data" action="%SCRIPTURL{upload}%/%WEB%/%TOPIC%" method="post" />
__Upload new picture:__ %BR%
<input type="file" name="filepath" value="" size="36" />
<input type="submit" class="twikiSubmit" value='Upload' />
<input type="hidden" name="filename" value="" />
<input type="hidden" name="filecomment" value="" />
<input type="hidden" name="createlink" value="" />
<input type="hidden" name="hidefile" value="on" />
<input type="hidden" name="updatefield" value="Image" />
</form>

Impact

WhatDoesItAffect: API, Usability

Implementation

-- Contributors: PeterThoeny - 2011-06-08

Discussion

This is now accepted by 7 days feedback period. It is also implemented in SVN trunk.

-- PeterThoeny - 2011-06-18

 
Topic revision: r4 - 2011-06-18 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.