Hello,
I would suggest you to take a look at the zipexplorer plugin code. The
downloadAttachment method creates a new attachment from a byte stream, and
attach it to a document. So the same way you can create an attachment from a
file input stream and attach it to the document you want.
Cheers,
Jerome
On 5/2/07, poy-julia.schwaegermann(a)hdi.de <poy-julia.schwaegermann(a)hdi.de>
wrote:
Hello everybody!
I write my diploma thesis! And I have a problem. I want to attach a file
to a page of the xwiki. This should happen automatically - this means
without any intervention of a user.
You can attach a file over the GUI and I want the same functionality in my
plugin. The file should be loaded from the folder and attached to the page
over the plugin and velocity. A batchscript should update the wiki every
hour, when some files in a given folder have changed.
The class "Document" in the package "com.xpn.xwiki.api" has a method
"addAttachment()", but I have the problem that this method is protected.
Thus I cannot attach a file with a self-written plugin. I don't find any
information about this context in the documentation.
Has anyone a solution for my problem? Could this person please send me the
coding or the link where I find the documentation/ information to solve the
problem?
Please please help me! I have to implement this functionality but I don't
know how. My diploma thesis is very important for me and I'm desperate!!!
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.orgmailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws