-
+
|
@@ -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 5f228b5..172e5fa 100644
--- a/composer.json
+++ b/composer.json
@@ -19,6 +19,7 @@
"friendsofsymfony/jsrouting-bundle": "^2.7",
"knplabs/doctrine-behaviors": "^2.2",
"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/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/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 %}
- |