Tags:
create new tag
, view all tags

Feature Proposals » Set form field format on file upload

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
MergedToCore PeterThoeny AcceptedBy7DayFeedbackPeriod 2014-12-08   TWikibug:Item7600 KampalaRelease

Edit Form

TopicSummary:
CurrentState:
CommittedDeveloper:
ReasonForDecision:
DateOfCommitment:   Format: YYYY-MM-DD
ConcernRaisedBy:
BugTracking:
OutstandingIssues:
RelatedTopics:
InterestedParties:
ProposedFor:
TWikiContributors:
 

Motivation

This is a small follow-up feature for the existing SetFormFieldOnFileUpload. The existing feature is used by the ChangeProfilePicture user interface to upload and set a profile picture in one step.

This new proposal allows TWiki app developers to define the format of the form field that contains the name of the uploaded file.

Description and Documentation

The existing updatefield URL parameter supported in the upload script defines the TWiki form field name to update with the name of the uploaded file.

The new updateformat URL parameter proposed for the upload script defines the format of the TWiki form field name to update with the name of the uploaded file. The default is $file, e.g. the name of the uploaded file.

Use case: A TWiki app has dashboards that allows users to select a banner image from a library (such as TWikiDashboardImages), or to upload a new banner image that is stored in the dashboard topic. In this case, the image can have two locations, e.g. web and topic name and the image name need to be recorded in a "Banner Image" form field so that the banner image can be shown in the dashboard. The updateformat can be set to Web/Topic/$file instead of just the file name. That way, the banner image URL can be constructed as %PUBURL%/%FORMFIELD{ "Banner Image" topic="%BASETOPIC%" }%.

Examples

Impact

Implementation

-- Contributors: Peter Thoeny - 2014-12-09

Discussion

This is now accepted by 7 days feedback period.

-- Peter Thoeny - 2014-12-15

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2014-12-16 - 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.