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. Image for the cookie policy date

Change AJAX upload url setting



When I change the ajaxSettings upload url, the data that usually gets passed (path, etc) is no longer passed with it. Is there a variable I can use in the ajaxSetting url field that will add the path info so that I can still figure out where to put the new file or do I have to use the default ajax endpoint to get that data?

3 Replies

BP Balamurugan P Syncfusion Team June 27, 2016 11:40 AM UTC

Hi David, 
Thanks for using Syncfusion Products. 
We have analyzed your reported problem ”When I change the AjaxSettings upload url, the data that usually gets passed (path, etc) is no longer passed with it”. Here path and other details will be passed to server end automatically, if you append the syntax format “{0}”  at the end of upload action URL. Please refer following code block, this will be helpful to solve your problem. 
Code example [JS] 
$("#fileExplorer").ejFileExplorer({ 
                path: "http://mvc.syncfusion.com/ODataServices/FileBrowser/", 
                ajaxSettings: { 
                    upload: { 
                        url: "http://mvc.syncfusion.com/OdataServices/fileExplorer/fileoperation/Upload{0}" 
                    } 
                } 
            }); 
 
Please let us know if you require any further assistance, we will happy to assist you. 


Regards, 
Balamurugan P 



DB David Barrett June 27, 2016 11:49 AM UTC


Thanks for the quick reply, it worked just like I wanted !!


BP Balamurugan P Syncfusion Team June 28, 2016 05:02 AM UTC

Hi David, 
We are glad to know that the solution works. Please let us know if you required any other concern on this. we will be happy to assist you. 

Balamurugan 


Loader.
Live Chat Icon For mobile
Up arrow icon