On Jun 4, 2013, at 3:41 PM, Hamster <teunham(a)hotmail.com> wrote:
To all,
Is there a way to rename an existing attachment?
I know that there's an *almost 6 years old* JIRA on Renaming Attachments
<http://jira.xwiki.org/browse/XWIKI-1657> but is it possible to rename an
attachment by for example velocity code?
No I don't think we have that ATM.
As a workaround you could do the same as we do for wiki pages, i.e.:
* copy the attachment under a new name (or create a new attachment taking existing
content)
* delete the old attachment
That would be an interesting snippet for
extensions.xwiki.org till the feature is
implemented.
Thanks
-Vincent
Why? I would like to rename the pictures when I use
the "Import Office
Document" feature, so I can get meaningful names for the Gallary Macro for
example (or when I want to re-use the picture on a different wiki-page)
Thanks!