create new tag
, view all tags

SID-02146: FileUploadPlugin Error

Status: Asked Asked TWiki version: 6.0.1 Perl version: 5.10.1
Category: FileUploadPlugin Server OS: CentOS release 6.5, kernel 2.6.32-431.29.2.e16.x86_64 Last update: 1 year ago

I am not having any success getting a file attached to a form.

I've recreated the topic and form in TestingFormFileTypeTopic. I understand that the FileUploadPlugin isn't installed in the Sandbox however I was hoping to check if I was missing something obvious.

On my Twiki installation, I can 'Browse' and add a file to the page however after pressing Submit the file doesn't appear in the Form.

If I try to 'Edit' the page and add a file (test.txt) to the form I'm able to 'Browse' and add the file however upon Saving I get the following error.

"During save of TestingFormTopic an error was found by the version control system. Please notify your TWiki administrator. Can't use an undefined value as a symbol reference Go back in your browser and save your changes locally."

Going back to the topic the name of the file that was attached is in the form however there is no actual attachment.

-- Jani Hamalainen - 2016-01-15

Discussion and Answer

Any ideas on options on how to resolve this issue? It seems that the same issue was experienced by someone in 2007 (http://twiki.org/cgi-bin/view/Plugins/FileUploadPluginDev)

-- Jani Hamalainen - 2016-01-21

Did a re-install of FileUploadPlugin and everything works great now. I think error was on my side.

-- Jani Hamalainen - 2016-02-11

-- Jani Hamalainen - 2016-02-11

Oops, forgot to also add the comment that I believe there is a minor error in the FileUploadPlugin.

If the attribute maxsize{} is used with units of "M" (ie. maxsize{1M} I believe that this effects two things:

1) The "M" also appears to be interpreted as a Mandatory condition (see TWikiForms). This means that the user must provide an attachment otherwise the topic will not save. This is easily avoided by using Kilo for the units.

2) If maxsize{} is used as an attribute the pattern{} attribute is also required. If not included an error saying that the filename pattern does not match is shown.

Should these notes also be added to the FileUploadPlugin topic?

-- Jani Hamalainen - 2016-02-11

Thank you Jani, I updated the plugin docs accordingly. Updated plugin is uploaded to FileUploadPlugin.

-- Peter Thoeny - 2016-02-14

Small two contributions to mention two issues that do not work properly with FileUploadPlugin

1) misinterpretation of the bar within the pattern

In the documetation of FileUploadPlugin there is an example

| Movie    |  file  |   10   |          |max size 100MB     |pattern{/\w+-\d{6}?.(?:mpg|avi|wmv)/i} maxsize{100M} | 
which does not work. At least in my installation twiki6.0 - the regular expression contains the bars |. They are interpreted as column separators within the form definition so that the pattern is malformed.The remedy: the bars must be escaped \|, i.e.
| Movie    |  file  |   10   |          |max size 100MB     |pattern{/\w+-\d{6}?.(?:mpg\|avi\|wmv)/i} maxsize{100M} | 

2) by editing an existing topic with a form containing a file entry, the value of the form field gets lost.

The file field can be nicely uploaded using the file-form-field. Its name is remembered then in the meta date of the topic like this

%META:FIELD{name="image" attributes="maxsize%7b1000K%7dpattern%7b\w+.(jpg|png|gif)%7d" title="image" value="Figure1.jpg"}%

But once I open the topic for editing and save it. The metadata of the file field is forgotten:, i.e.

%META:FIELD{name="image" attributes="maxsize%7b1000K%7dpattern%7b\w+.(jpg|png|gif)%7d" title="image" value=""}%

Is there some remedy for this? Many thanks for a hint.

-- Rostislav Chudoba - 2016-03-03

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Status Asked
Title FileUploadPlugin Error
SupportCategory FileUploadPlugin
TWiki version 6.0.1
Server OS CentOS release 6.5, kernel 2.6.32-431.29.2.e16.x86_64
Web server Apache /2.2.15
Perl version 5.10.1
Browser & version Chrome Version 47.0.2526.111 m
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2016-03-03 - RostislavChudoba
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.