diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-03-28 23:53:51 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-03-28 23:53:51 +0200 |
commit | 72882beb0d6ba7ebb70bdd6265c15656376e742c (patch) | |
tree | b618e3253a5cf5fb06faeff22c13a8622410329a /apps/files_archive | |
parent | 1b6fe4f65efb1d1f696f35b70454ad30cae6310b (diff) | |
download | nextcloud-server-72882beb0d6ba7ebb70bdd6265c15656376e742c.tar.gz nextcloud-server-72882beb0d6ba7ebb70bdd6265c15656376e742c.zip |
enble browsing tar files in the web interface
Diffstat (limited to 'apps/files_archive')
-rw-r--r-- | apps/files_archive/js/archive.js | 4 | ||||
-rw-r--r-- | apps/files_archive/lib/storage.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_archive/js/archive.js b/apps/files_archive/js/archive.js index ec316c7bf2c..531eb61c01a 100644 --- a/apps/files_archive/js/archive.js +++ b/apps/files_archive/js/archive.js @@ -11,5 +11,9 @@ $(document).ready(function() { window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); }); FileActions.setDefault('application/zip','Open'); + FileActions.register('application/x-gzip','Open','',function(filename){ + window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/x-gzip','Open'); } }); diff --git a/apps/files_archive/lib/storage.php b/apps/files_archive/lib/storage.php index 598b85f0dbe..700d9633042 100644 --- a/apps/files_archive/lib/storage.php +++ b/apps/files_archive/lib/storage.php @@ -125,7 +125,7 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{ self::$rootView=new OC_FilesystemView(''); } self::$enableAutomount=false;//prevent recursion - $supported=array('zip'); + $supported=array('zip','tar.gz','tar.bz2','tgz'); foreach($supported as $type){ $ext='.'.$type.'/'; if(($pos=strpos(strtolower($path),$ext))!==false){ |