Unzip          
  
   
 


Get Action Unzips a zip file in as an attachment to the current page

Get Parameters

  • pageName - The name of the page to attach the unzipped files to
  • fileName - The name of the file to unzip

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.unZipAttachment(pageName,fileName); user = transaction.getUser(); wiki.addJournalEntry("File ["+pageName+"/"+fileName+"] unzipped to Page ["+pageName+"] by "+user); page = wiki.buildPage(pageName); transaction.goToPage(pageName); }
by Admin on 21/04/2008 at 10:09 PM