-
+
|
@@ -191,7 +191,7 @@ export default {
files: [],
parent: null,
modalUrl: null,
- ajax: 0,
+ ajax: 0
}
},
methods: {
@@ -261,7 +261,7 @@ export default {
axios.get(Routing.generate('admin_file_manager_api_directory', {
directory: that.directory,
context: that.context,
- ajax: this.ajax,
+ ajax: this.ajax
}))
.then((response) => {
that.buildBreadcrum(response.data.breadcrumb)
diff --git a/composer.json b/composer.json
index 0848a6f..519abae 100644
--- a/composer.json
+++ b/composer.json
@@ -20,6 +20,7 @@
"knplabs/knp-markdown-bundle": "^1.9",
"knplabs/knp-menu-bundle": "^3.1",
"knplabs/knp-paginator-bundle": "^5.4",
+ "liip/imagine-bundle": "^2.6",
"phpdocumentor/reflection-docblock": "^5.2",
"scheb/2fa-google-authenticator": "^5.7",
"scheb/2fa-qr-code": "^5.7",
diff --git a/config/bundles.php b/config/bundles.php
index 096b755..f48fded 100644
--- a/config/bundles.php
+++ b/config/bundles.php
@@ -24,4 +24,5 @@ return [
FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true],
Knp\DoctrineBehaviors\DoctrineBehaviorsBundle::class => ['all' => true],
SPE\FilesizeExtensionBundle\SPEFilesizeExtensionBundle::class => ['all' => true],
+ Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
];
diff --git a/config/packages/fos_js_routing.yaml b/config/packages/fos_js_routing.yaml
new file mode 100644
index 0000000..0268498
--- /dev/null
+++ b/config/packages/fos_js_routing.yaml
@@ -0,0 +1,3 @@
+fos_js_routing:
+ routes_to_expose:
+ - liip_imagine_filter
diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml
new file mode 100644
index 0000000..f201244
--- /dev/null
+++ b/config/packages/liip_imagine.yaml
@@ -0,0 +1,9 @@
+# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
+liip_imagine:
+ # valid drivers options include "gd" or "gmagick" or "imagick"
+ driver: "imagick"
+ filter_sets:
+ file_manager_thumbnail_filter:
+ filters:
+ downscale:
+ max: [120, 120]
diff --git a/config/routes/liip_imagine.yaml b/config/routes/liip_imagine.yaml
new file mode 100644
index 0000000..201cbd5
--- /dev/null
+++ b/config/routes/liip_imagine.yaml
@@ -0,0 +1,2 @@
+_liip_imagine:
+ resource: "@LiipImagineBundle/Resources/config/routing.yaml"
diff --git a/core/FileManager/FsFileManager.php b/core/FileManager/FsFileManager.php
index 84bccc2..f2f77ea 100644
--- a/core/FileManager/FsFileManager.php
+++ b/core/FileManager/FsFileManager.php
@@ -77,6 +77,7 @@ class FsFileManager
$data['directories'][] = [
'basename' => $file->getBasename(),
'path' => $directory.'/'.$file->getBasename(),
+ 'webPath' => $this->pathUri.'/'.$directory.'/'.$file->getBasename(),
'locked' => $this->isLocked($directory.'/'.$file->getBasename()),
'mime' => null,
];
@@ -89,6 +90,7 @@ class FsFileManager
$data['files'][] = [
'basename' => $file->getBasename(),
'path' => $directory,
+ 'webPath' => $this->pathUri.'/'.$directory.'/'.$file->getBasename(),
'locked' => $this->isLocked($directory.'/'.$file->getBasename()),
'mime' => mime_content_type($file->getRealPath()),
];
diff --git a/core/Resources/views/file_manager/info.html.twig b/core/Resources/views/file_manager/info.html.twig
index 511c8dd..c2edd29 100644
--- a/core/Resources/views/file_manager/info.html.twig
+++ b/core/Resources/views/file_manager/info.html.twig
@@ -131,8 +131,24 @@
{% endif %}
- |