We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

problem downloading the file from file explorer

Thread ID:

Created:

Updated:

Platform:

Replies:

127399 Nov 14,2016 01:41 AM Nov 15,2016 04:36 AM JavaScript 1
loading
Tags: ejFileExplorer
Alessio Bacin
Asked On November 14, 2016 01:41 AM

Hi,

I am using the file explorer to in my project everything is working fine, except when i try to down load the file the request to download the file is send using get method and not post. Also there are no parameters passed to the request. the code for the same is :

var fileSystemPath = '/Files/';
                // var fileSystemPath = "/Files";

var ajaxActionHandler = "/FileHandler";

$(id + " .fileExplorer").ejFileExplorer({
    path: fileSystemPath,
    ajaxAction: ajaxActionHandler+ params,
    draggable:true,
    ajaxSettings: {
        read: {
            url: ajaxActionHandler + params,
            dataType: "json"
        },
        createFolder: {
            url: ajaxActionHandler + '/create-folder',
            dataType: "json"
        },
        remove: {
            url: ajaxActionHandler + '/remove',
            dataType: "json"
        },
        rename: {
            url: ajaxActionHandler + '/rename',
            dataType: "json"
        },
        paste: {
            url: ajaxActionHandler + '/paste',
            dataType: "json"
        },
        getDetails: {
            url: ajaxActionHandler + '/get-details',
            dataType: "json"
        },
        upload: {
            url: ajaxActionHandler + '/upload',
            dataType: "json"
        },
        download: {
            url: ajaxActionHandler + '/download',
            dataType: "json",
            method:'post'
        },
        getImage: {
            url: ajaxActionHandler + '/get-image',
            dataType: "json"
        },
    },
    toolsList: ["creation", "navigation", "editing", "copyPaste", "getProperties", "layout"],
    tools: {

        creation: ["NewFolder"],

        navigation: ["Back", "Forward", "Upward"],

        editing: ["Refresh", "Upload", "Delete", "Rename", "Download"],

        copyPaste: ["Cut", "Copy", "Paste"],

        getProperties: ["Details"],

        layout: ["Layout"],

    },
    isResponsive: true
});

Thanks in advance

Balamurugan P [Syncfusion]
Replied On November 15, 2016 04:36 AM

Hi Allessio, 
Thanks for using Syncfusion Products. 

We have analyzed the reported issue with your provided code blocks. In our FileExplorer, we have processed the request in URL format for “upload, download and getImage” actions. So you can’t specify AJAX settings for these actions and you can  specify the URL only, not other properties like “ datatype, method, etc..”.  
 
Please refer following link. 

Also its compulsory to add “{0}” in the end of “upload, download and GetImage” URLs. That helps to pass the internal parameters with the action request. 

upload: {
    url: ajaxActionHandler + ‘/upload{0}’
  },
download: {
    url: ajaxActionHandler + ‘/download{0}’   
 
   },
GetImage: {
    url: ajaxActionHandler + ‘/get-image{0}’
 }
 

Please let me know if you have any concerns. 

Regards, 
Balamurugan P 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;