This question about Missing functionality: Answered
Restore Attachment Version
Hi,
i miss a restore function (to restore/reset former attachment versions) in the attachment view. Does this function exist anywere in the foswiki sphere? I guess no, but before i make this work, i just want to ask you...
Thank you,
Alex
--
AlexanderStoffers - 19 Jan 2010
There is no way to do this interactively (nor is there any way to do it on a topic) and it goes against the "nothing is lost" principle.
If you want to re-attach an old revision of an attachment, then:
- Download the old revision you want to restore
- Re-attach it as the attachment
--
CrawfordCurrie - 20 Jan 2010
Crawford's right, there's no interactive way to restore an old attachment version.
But we do have this for topics ("More topic actions"). You can restore a previous version; it opens up the editor filled with the selected revision's topic text.
--
PaulHarvey - 20 Jan 2010
I just created a restore-script in an easy way:
sub restoreAttachment:
1. get the attachment via viewfile
2. save the attachment via perl-filehandling
Afterwards i created a new functionallity in the bin folder called "restoreAttachment". I also changed the "Changes" table in the attachment view. With my new link "restore" in the action row i call the restoreAttachment in the bin folder (
http://127.0.0.1/foswiki/bin/restoreAttachment/Main/Test1?filename=Test1.png;rev=5)
Is there a gerneral need of such a functionality?
--
AlexanderStoffers - 22 Jan 2010
it certainly would be nice to add this functionality to the manage attachments user interface.
if you make a feature request and attach your code to it, I'm sure it will be interesting
--
SvenDowideit - 22 Jan 2010