[xwiki-dev] How to attach a file to the current page with a plugin
Jerome Velociter
jerome.velociter at gmail.com
Wed May 2 19:49:13 CEST 2007
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 at hdi.de <poy-julia.schwaegermann at 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 at objectweb.orgmailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xwiki.org/pipermail/devs/attachments/20070502/70aacae6/attachment.htm
More information about the devs
mailing list