|
Cookbook /
UploadFormSummary: Alternative file upload form using
(:input file:)Version: 2007-09-03
Prerequisites: pmwiki 2.2 beta
Status: new
Maintainer: HansB
Categories: Uploads
Download: uploadform.phpΔ
Questions answered by this recipeHow can I create an alternative to the default pmwiki upload page?
DescriptionUploadForm adds action 'postupload2' for use in alternative upload forms. Installation: Download uploadform.phpΔ, copy to cookbook directory and install in config.php with:
include_once("$FarmD/cookbook/uploadform.php");
Create an alternative upload form using Forms markup and the An example for a simple form (not enabled on this page):
This form will keep the user on the page, and not redirect to the default uploads form. The script uses the standard file verification function. The form will display the upload result via the To show a list of uploaded files (attachments), use markup Firefox drag-and-drop-files supportYou can add support for drag-and-drop multiple files in Firefox by installing the dragdropupload Firefox extension. To create an upload form which can handle multiple files dropped on it, build a form like this example: >>frame<<
(:messages:)
(:input form enctype='multipart/form-data' action={*$PageUrl}:)
(:input hidden action postupload2:)
''This input box accepts multiple files dropped on it, which cannot be renamed''
||width=100%
|| File(s) to upload:||(:input dropfiles uploadfiles size=50:) ||
|| ||(:input submit post "Upload Files":) ||
(:input end:)
>><<
Note the file control is input dropfiles and its name is uploadfiles, not uploadfile. This makes it possible to have both forms of this type and of the single file input type shown first. Notesuploadform.php includes a modification of the HandlePostUpload function from scripts/upload.php. Release Notes
CommentsSee AlsoContributors |