[opencms-dev] FormGenerator 2.0 - subfields and upload files

Sandrine Prousteau s.prousteau at eurelis.com
Thu Oct 20 10:01:26 CEST 2011


I made some tests:

With the first config, I added a fileupload type field in basic fields :  When I submit, filling the upload subfield, all the files are well imported, with or without filling the basic upload field. When I remove the upload basic field, no import. It's like it is necessary to have a upload basic field to get upload files functionality working well...

Another strange behavior:

When I am in a well working configuration, sometimes files are stored in /system/shared/webform/, sometimes in /system/shared/webform/nameofmyform/. How does it work? Is it a bug?

-----Message d'origine-----
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Sandrine Prousteau
Envoyé : jeudi 20 octobre 2011 09:39
À : The OpenCms mailing list
Objet : [opencms-dev] FormGenerator 2.0 - subfields and upload files

Hi
I'm using Formgenerator 2.0 on OpenCms 8.0.2.
I have an issue with webform generator file uploads.

I set a subfield of type CmsFileUploadField. When I submit the form width this field filled with a valid .doc, the upload file is not imported in the db (in the admin view, in the reports table, the column of this field is filled with only the name of the file, but not the imported uri).
I'd like to get it too by API using :
Map fileUploads =
(Map)this.getCmsFormHandler().getRequest().getSession().getAttribute(Cms
FormHandler.ATTRIBUTE_FILEITEMS);
Iterator it = fileUploads.values().iterator(); But nothing is returned.

When I try the same with a basic field, not a subfield, it works well, I have the file in the admin view, I can read it in /system/shared/webform/, I can get it by API with the code above.

Is it a bug?

_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list