Install          
  
   
 


Get Action Installs a file with an openforum extension

Get Parameters

  • pageName - The page where the file is attached
  • fileName - The file to install

Server Side Javascript for GET method

if(typeof(pageName)=="undefined") { transaction.setResult(transaction.SHOW_PAGE); } else { transaction.userCanPerformAction(pageName,"update",true); fileName = transaction.getParameter("fileName"); file.installAttachment(pageName,fileName); user = transaction.getUser(); wiki.addJournalEntry("File ["+pageName+"/"+fileName+"] installed by "+user); page = wiki.buildPage(pageName); transaction.goToPage(pageName); }
by Admin on 21/04/2008 at 10:09 PM