Hi Edy,
On 13 Nov 2015 at 19:06:33, Eduard Moraru (enygma2002(a)gmail.com(mailto:
enygma2002(a)gmail.com)) wrote:
Hi,
About the URL format, why not implement it as a REST extension of the
/attachment/ resource?
Maybe .../attachments/{attachmentName}/zipExplorer/{zipPath} or something
like that.
That’s a good generic remark: we need to decide what to do going forward
between REST-module type of URLs and Action-module type of URLs.
Ideally I think we would use the following strategy:
* For human-readable URLs: use the Action-module type
* For programmatic URLs (get, webjars, zip, etc): use the REST-module type
However, right now the Action-module type (Resource module to be precise)
are much more powerful than the REST ones (see
http://design.xwiki.org/xwiki/bin/view/Design/ActionModule). For example
you can execute action after others, or before or replacing them. You vzn
register new actions dynamically in Extensions (which is not possible as
REST components ATM). etc.
So while I agree with you in general, I wouldn’t want to do this now for
the zip module because of this.
Now, we shouldn’t care too much about this since it’s only implementation
details. What we should care about is the URL format.
Right now the format I’m proposing is:
Be careful with putting the serialized (attachment) reference in the URL.
Special characters are escaped in the reference using \ (backslash) which
may cause problems even when URL encoded (e.g. for Tomcat). See