diff --git a/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.css b/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.css index a759ec8a43352f0afdbb2fdd36cbc66b05a01322..14bac1a02f071760a18454cc26398d549791570d 100644 --- a/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.css +++ b/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.css @@ -81,12 +81,15 @@ height: 90px !important; } .modal-image-zone { + text-align: center; max-height: 600px; overflow-y: auto; } .modal-image-zone > img { height: auto; width: 100%; + max-width: 350px; + max-height: 350px; } .file_picker .container { diff --git a/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.js b/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.js index b53261f06a1af832d28772ca6bbf1b3a92c3581b..d10ffff7daab2e16ecc77205383e0c2a8052be7a 100644 --- a/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.js +++ b/src/vitis/client/javascript/externs/formReader/component/file_picker/file_picker.js @@ -546,27 +546,6 @@ nsVitisComponent.FilePickerDirective = function ($timeout, $translate, propertie scope['showImageModal'] = function(oImage, oBlob) { $log.log("formReader.FilePickerDirective.showImageModal"); - // Téléchargement image grande si thumbnail - if (goog.isDefAndNotNull(oImage._url) && oImage._thumbnail === true) { - scope['downloadFileBlob'](oImage._url, false, 3).then(function(oBlob){ - var picReader = new FileReader(); - picReader.addEventListener('load', angular.bind(this, function (oBlob, event) { - var picFile = event.target; - scope.$applyAsync(function(){ - scope['showImageModal']({ - 'name': oBlob['name'], - 'src': picFile['result'], - _url: oBlob._url, - _thumbnail: oBlob._thumbnail - }, oBlob); - }); - }, oBlob)); - picReader.readAsDataURL(oBlob); - - }); - return 0; - } - var iImageIndex; for (var i = 0; i < scope['aPreviewImages'].length; i++) { if(scope['aPreviewImages'][i]['name'] === oImage['name']){ @@ -590,7 +569,7 @@ nsVitisComponent.FilePickerDirective = function ($timeout, $translate, propertie * Téléchargement de l'image */ $(domDownloadButton).click(function(){ - scope['downloadFile'](oImage, oBlob); + scope['downloadDocument'](oImage); }); /** diff --git a/src/vitis/vas/rest/class/vmlib/files/Files_manager.class.inc b/src/vitis/vas/rest/class/vmlib/files/Files_manager.class.inc index 81dbcc40301fc5f618f92b00584430cfd19a4d7a..107b1f237634127d2bfb2e7c82e2cd7e51b68d3f 100644 --- a/src/vitis/vas/rest/class/vmlib/files/Files_manager.class.inc +++ b/src/vitis/vas/rest/class/vmlib/files/Files_manager.class.inc @@ -363,6 +363,14 @@ class Files_manager{ $aThumbnailFileStruct = $aFileStruct; $aThumbnailFileStruct["width"] = 200; $aThumbnailFileStruct["height"] = 200; + + if (is_int($this->oProperties['filesystem_thumbnails_width'])) { + $aThumbnailFileStruct["width"] = $this->oProperties['filesystem_thumbnails_width']; + } + if (is_int($this->oProperties['filesystem_thumbnails_height'])) { + $aThumbnailFileStruct["height"] = $this->oProperties['filesystem_thumbnails_height']; + } + $aThumbnailFileStruct['tmp_name'] = $aThumbnailFileStruct['tmp_name'] . '.min'; $aDestPathExt = explode('.', $sDestPath); diff --git a/src/vitis/vas/rest/conf/properties_server.inc b/src/vitis/vas/rest/conf/properties_server.inc index 494c13e697f984b236ba8e59c84bd894572e9cf1..e14c4eb7f056ae9f6944dbc87089f7abcbba8155 100644 --- a/src/vitis/vas/rest/conf/properties_server.inc +++ b/src/vitis/vas/rest/conf/properties_server.inc @@ -49,6 +49,8 @@ $properties["notifierAccessKeyAccount"] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX $properties["notifierSecretKeyAccount"] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; // utilisation de s3 pour remplacer le système de Fichier $properties['filesystem'] = 'fs'; // s3 +$properties['filesystem_thumbnails_width'] = 350; // taille des images .min.jpg +$properties['filesystem_thumbnails_height'] = 350; // taille des images .min.jpg $properties['AWSCredentialsFilePath'] = ""; // .../.aws/credentials $properties["fileS3UploaderProfil"] = ""; $properties["fileS3UploaderBucket"] = "";