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

Followup feature proposed: SetFormFieldFormatOnFileUpload.

-- Peter Thoeny - 2014-12-09

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2014-12-09 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.