On 04/06/2012 07:18 PM, du du wrote:
Hi, all,
I am trying to add a file upload page to xwiki, since the FileUploadPlugin java class is deprecated, is there any other fileupload component available for reuse? if no, I need to create the component on my own, my concern is I need to insert the file uploaded into database and keep it separate from all the other wiki tables, I like to create a separate table specifically for files uploaded, that means I need to use Hibernate in java code to handle that, any examples about how to do that? BTW, I am coming from IBatis background.
Thanks in advance
There is no alternative to the plugin yet, but I've been working on a replacement these past days, I'll commit it after the master becomes 4.1-SNAPSHOT (probably next Tuesday). Example of code using Hibernate directly: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... And the associated mapping file: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... You'll need to add the name of the mapping file in hibernate.cfg.xml to enable this extra mapping. -- Sergiu Dumitriu http://purl.org/net/sergiu/