Hallo Carlos,

would you share your code with us (or with me)? I was just about to implement 
something similar, so maybe your code would help me reducing the work I have to 
do.

Thank you in Advance.
Thomas 

-------- Original-Nachricht --------
> Datum: Tue, 3 Aug 2010 20:27:48 -0500
> Von: Carlos Correa <carloscorrea...@gmail.com>
> An: XWiki Users <users@xwiki.org>
> Betreff: Re: [xwiki-users] File Explorer for Unix FS

> This is a bit of a late reply, but I've implemented this and am
> wondering what you would recommend doing about security with this
> approach.
> 
> On Thu, Jul 15, 2010 at 5:10 PM, Sergiu Dumitriu <ser...@xwiki.com> wrote:
> >
> > On 07/15/2010 04:55 PM, Carlos Correa wrote:
> > > One of the users of the xwiki server (*nix) that I'm helping with has
> > > an interesting feature request. He wants a wiki page with a listing of
> > > Microsoft Office files that are in a unix directory. He wants to be
> > > able to click on one of the file names and have it download.
> > >
> > > I don't know enough about xwiki to know how to cause a download to
> > > occur on the user's side. The only solution I can think of is
> > > attaching the files to the page and scripting regular updating (which
> > > is very clunky). Is there a more elegant way to cause downloads to
> > > occur on the user's end without adding the file as an attachment?
> >
> > Well, XWiki is a java application, so the easiest thing to do is to
> > write a Java component that does this. Assuming you have a recent
> > version of XWiki, you should:
> > - write a scriptable service which can list the files on the filesystem;
> > should be a ScriptService component if you're targeting XWiki 2.3 or
> > later, or a VelocityContextInitializer for earlier; see
> > http://code.xwiki.org/xwiki/bin/view/Modules/ComponentModule for general
> > documentation about components
> > - write a servlet or a struts action which can be used to retrieve the
> > contents of the file; make sure you're not creating a security hole,
> > check the absolute path requested by the user; a good example would be
> >
> http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/TempResourceAction.java
> > - register the above servlet/struts action in web.xml, respectively
> > struts-config.xml
> >
> > --
> > Sergiu Dumitriu
> > http://purl.org/net/sergiu/
> > _______________________________________________
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users

-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to