Kaynağa Gözat

Setup oneup_flysystem

jmontoyaa 8 yıl önce
ebeveyn
işleme
1b4b072b8f

+ 2 - 2
app/AppKernel.php

@@ -115,9 +115,9 @@ class AppKernel extends Kernel
             /*
             /*
             // Chamilo course tool
             // Chamilo course tool
             //new Chamilo\NotebookBundle\ChamiloNotebookBundle(),
             //new Chamilo\NotebookBundle\ChamiloNotebookBundle(),
-
+            */
             // Data
             // Data
-            //new Oneup\FlysystemBundle\OneupFlysystemBundle(), */
+            new Oneup\FlysystemBundle\OneupFlysystemBundle(),
 
 
             // Extra
             // Extra
             new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
             new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),

+ 17 - 17
app/config/config.yml

@@ -204,23 +204,23 @@ liip_theme:
     active_theme: 'web'
     active_theme: 'web'
     assetic_integration: true
     assetic_integration: true
 
 
-#oneup_flysystem:
-#    adapters:
-#        local.adapter:
-#            local:
-#                directory: %kernel.root_dir%/courses
-##        s3.adapter:
-##              awss3v3:
-##                  client: s3_client # add service "s3_client"
-##                  bucket: ~
-##                  prefix: ~
-#
-#    filesystems:
-#        course:
-#            adapter: local.adapter
-#            cache: ~
-#            alias: ~
-#            mount: ~
+oneup_flysystem:
+    adapters:
+        local.adapter:
+            local:
+                directory: %kernel.root_dir%/courses
+#        s3.adapter:
+#              awss3v3:
+#                  client: s3_client # add service "s3_client"
+#                  bucket: ~
+#                  prefix: ~
+
+    filesystems:
+        course:
+            adapter: local.adapter
+            cache: ~
+            alias: ~
+            mount: ~
 
 
 #jms_translation:
 #jms_translation:
 #    configs:
 #    configs:

+ 1 - 1
composer.json

@@ -164,7 +164,7 @@
         "alchemy/zippy": "^0.2.1",
         "alchemy/zippy": "^0.2.1",
         "hwi/oauth-bundle": "^0.4.0",
         "hwi/oauth-bundle": "^0.4.0",
         "genemu/form-bundle": "2.2.*",
         "genemu/form-bundle": "2.2.*",
-        "oneup/flysystem-bundle": "@stable",
+        "oneup/flysystem-bundle": "1.7.*",
         "intervention/image": "^2.3",
         "intervention/image": "^2.3",
         "apy/datagrid-bundle": "^2.2",
         "apy/datagrid-bundle": "^2.2",
         "stephpy/timeline-bundle": "~2.0",
         "stephpy/timeline-bundle": "~2.0",

+ 0 - 1
src/Chamilo/CoreBundle/Controller/ResourceController.php

@@ -34,7 +34,6 @@ class ResourceController extends BaseController
             $filePath = $adapter->getPathPrefix().$path;
             $filePath = $adapter->getPathPrefix().$path;
 
 
             return new BinaryFileResponse($filePath);
             return new BinaryFileResponse($filePath);
-
         } catch (\InvalidArgumentException $e) {
         } catch (\InvalidArgumentException $e) {
             return $this->abort();
             return $this->abort();
         }
         }