Local file open works, on server it doesn't

2 posts, 0 answers
  1. Marnix Bouwman
    Marnix Bouwman avatar
    22 posts
    Member since:
    Nov 2009

    Posted 30 Sep 2013 Link to this post

    Hi, I've got this code:

    function OnClientFileOpen(oExplorer, args) {
            var isDirectory = args.get_item().isDirectory();

            if (!isDirectory) {
                var fileExt = args.get_item().get_extension();
                    args.set_cancel(true);
                    var itemPath = args.get_item().get_path();
                    window.open(encodeURIComponent(itemPath));
            }
        }

    When I try to open a file with a & in the path, locally it opens fine, however, if I try it on the server, it can't find the file.
    I think it gives a 404 error.
    So what can I do?
  2. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 02 Oct 2013 Link to this post

    Hi Marnix,

    Please take a look over the following forum thread for more information on why this issue is happening and how you can workaround this behavior: Image Preview not working

    Kind regards,
    Veselina Raykova
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top