Вопрос

I have integrated elFinder with an Asp.Net Mvc application using the information here.

Whenever a user double clicks a file the filesystem's path to the file is sent to the browser instead of the URL path. However using the download button works perfectly. The files are in a folder not under the web folder.

Anyone seen this before? Know of a fix?

I am assuming the files (and their) paths are stored locally since I do not see a call to the server to "open" the file. I do see a server call to "open" folders. If that's the case it would appear the file path isn't being converted to the url path.

Это было полезно?

Решение

I ended up adding this option

            getFileCallback: function(file, fm) {
                $('#elfinder').elfinder('instance').exec('download');
            }

Works like a charm.

Другие советы

You can also overwrite the doubleclick handler

//
var elf = $('#elfinder').elfinder(
{
    url: 'example.com/connector.php',
    //Other settings
    handlers:
    {
        dblclick: function(event, elfinderInstance)
        {
            elfinderInstance.exec('download');
        }
    }
}).elfinder('instance');
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top