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

CurrentState:
ReasonForDecision:
DateOfCommitment: Format: YYYY-MM-DD
ProposedFor:

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
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.

AltStyle によって変換されたページ (->オリジナル) /