Post Action Saves some text as an attachment
Post Parameters
- pageName - The name of the page to save attachment to
- fileName - The file name for the attachment
- data - The data to place in the attachment
Server Side Javascript for POST method
transaction.getPostData();
pageName = transaction.getPostParameter("pageName");
transaction.userCanPerformAction(pageName,"update",true);
fileName = transaction.getPostParameter("fileName");
data = transaction.getPostParameter("data");
user = transaction.getUser();
wiki.saveAsAttachment(pageName,fileName,data,user);
wiki.buildPage(pageName);
transaction.goToPage(pageName);