File Manager does not work
Permalink Browser Info Environment
When you click on a file manager I vyberaem picture and gives me an error message "You must select an image file only"
Type: | Pre-Sale |
---|---|
Status: | In Progress |
Because the file-manager inform that file is not recognized as a image. Wich type of file is ?
file Type png, jpg
ConcreteFileManager.launchDialog(function (data) {
// data : Object {fID: "1"}
$.get(getFileDetailDetailJson,{fID:data.fID}, function(file) {
if(file.type == "Image"){
jQuery.fn.dialog.hideLoader();
fillTemplate(file,Launcher);
// On ajoute un nouvel element vide a coté
fillTemplate();
return;
} ;
jQuery.fn.dialog.hideLoader();
alert('You must select an image file only'
a problem due to the fact that the variable "Image" is transferred "Изображения"
// data : Object {fID: "1"}
$.get(getFileDetailDetailJson,{fID:data.fID}, function(file) {
if(file.type == "Image"){
jQuery.fn.dialog.hideLoader();
fillTemplate(file,Launcher);
// On ajoute un nouvel element vide a coté
fillTemplate();
return;
} ;
jQuery.fn.dialog.hideLoader();
alert('You must select an image file only'
a problem due to the fact that the variable "Image" is transferred "Изображения"
if you do it like this
var attachFileManagerLaunch = function($obj) {
$obj.find('.add-file').click(function(event){
event.preventDefault();
var Launcher = $obj;
ConcreteFileManager.launchDialog(function (data) {
// data : Object {fID: "1"}
$.get(getFileDetailDetailJson,{fID:data.fID}, function(file) {
if(file.generic_type == '1'){
jQuery.fn.dialog.hideLoader();
fillTemplate(file,Launcher);
// On ajoute un nouvel element vide a coté
fillTemplate();
return;
} ;
jQuery.fn.dialog.hideLoader();
alert('You must select an image file only')
},'json');
});
});
}
everything works ok
var attachFileManagerLaunch = function($obj) {
$obj.find('.add-file').click(function(event){
event.preventDefault();
var Launcher = $obj;
ConcreteFileManager.launchDialog(function (data) {
// data : Object {fID: "1"}
$.get(getFileDetailDetailJson,{fID:data.fID}, function(file) {
if(file.generic_type == '1'){
jQuery.fn.dialog.hideLoader();
fillTemplate(file,Launcher);
// On ajoute un nouvel element vide a coté
fillTemplate();
return;
} ;
jQuery.fn.dialog.hideLoader();
alert('You must select an image file only')
},'json');
});
});
}
everything works ok
if(file.type == "Image")
variable "Image" should not be translated
I have a multilingual website, because this translates "Image"
variable "Image" should not be translated
I have a multilingual website, because this translates "Image"
did you see a thumbnail in the filemanager ?
file manager I go to the directory with pictures, but when I select picture, I immediately throws an error "You must select an image file only"
the screens in steps:
"did you see a thumbnail in the filemanager ?" yes
Which version of C5 are u using ?
C5 version 5.7.4.2
Thanks a lot for the tips !