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

Fullpath resolve

HI!


We try use fileExplorer but we can't use with a fullpath... ie: we try "~/attachmentFiles/" and all ok. But when try "~/attachmentFiles/1e178d07-bedc-4717-abb1-db2b8bdd81ed", we have some problems.

1. when we upload file, the fileExplorer controller back to rootPath = ~/attachmentFiles/" 
2. When we download file happen the same.
3. If we use locale  "es-ES", show error: 

Uncaught TypeError: Cannot read property 'ContextMenuOpen' of undefinedt.widget._getLocalizedLabels @ ej.web.all.min.js:10t.widget._initContextMenuOptions @ ej.web.all.min.js:10t.widget._initialize @ ej.web.all.min.js:10t.widget._init @ ej.web.all.min.js:10(anonymous function) @ ej.web.all.min.js:10t.widget.n.fn.(anonymous function) @ ej.web.all.min.js:10initControls @ ej.unobtrusive.min.js:10checkUnobtrusive @ ej.unobtrusive.min.js:10wd.init @ ej.unobtrusive.min.js:10(anonymous function) @ ej.unobtrusive.min.js:10x.Callbacks.c @ jquery-1.10.2.min.js:21x.Callbacks.p.fireWith @ jquery-1.10.2.min.js:21x.extend.ready @ jquery-1.10.2.min.js:21q @ jquery-1.10.2.min.js:21
I track communication with server, and i see "args.Path" take rootpath, then, i think is a problem of cliente side when take fullpath.

I try resolved saving fullpath in session, but i think is not the better.

¿any idea?

 public ActionResult FileActionDefault(FileExplorerParams args)
        {
          
          
            switch (args.ActionType)
            {
                case "Read":
                    if (!Directory.Exists(HttpContext.Server.MapPath(args.Path)))
                        Directory.CreateDirectory(HttpContext.Server.MapPath(args.Path));
                    return Json(FileExplorerOperations.Read(args.Path, args.ExtensionsAllow));
                case "CreateFolder":
                    return Json(FileExplorerOperations.CreateFolder(args.Path, args.Name));
                 case "Delete":
                    FileExplorerOperations.Delete(args.Name.Split(','), args.Path);
                    break;
             
                case "GetDetails":
                    return Json(FileExplorerOperations.GetDetails(args.Path, args.Name, args.Type));
                case "Download":
                    FileExplorerOperations.Download(args.Path);
                    break;
                case "Upload":
                    FileExplorerOperations.Upload(args.FileUpload, args.Path);
                    break;
            }
            return Json("");
        }


 @(Html.EJ().FileExplorer("fileExplorerAttachment")
                .FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx,*.pdf")
                .Path(@Model.FilesPath)
                .AllowMultiSelection(true)
                
                .AjaxAction(@Url.Content("FileActionDefault"))
                //.Locale("es-ES")
                
                .ShowTreeview(false)
                .Layout(LayoutType.Grid)
                .IsResponsive(true)
                .ShowContextMenu(false)
                .ShowFooter(true)
                .ToolsList(new List<string>() {"editing" }
                        )


                )

js:

<script src="/Scripts/ej/ej.web.all.min.js"></script>
<script src="/Scripts/ej/ej.unobtrusive.min.js"></script>
Version:

Syncfusion.EJ, Version=13.2450.0.29, 
Syncfusion.EJ.MVC, Version=13.2500.0.29


Thanks!



7 Replies

BP Balamurugan P Syncfusion Team August 18, 2015 01:26 PM UTC

Hi David,
Sorry for the Inconvenience caused.       

Query1:  when try "~/attachmentFiles/1e178d07-bedc-4717-abb1-db2b8bdd81ed", we have some problems.

1. When we upload file, the fileExplorer controller back to rootPath = ~/attachmentFiles/" 

2. When we download file happen the same.
We are able to reproduce the reported issue in specified version. This issue occurs if forward slash (“/”) is not included at the end of the file path. To resolve this problem, please specify the path as shown below "~/attachmentFiles/1e178d07-bedc-4717-abb1-db2b8bdd81ed/”
We have fixed this issue internally, and it will be included in our upcoming service pack release for JavaScript which is expected to be roll out at the end of this month (August).

Query2. If we use locale “es-ES", show error: 

To render control with localization support (locale “es-ES), you have to define the API ej.FileExplorer.Locale["es-ES"] and ej.Uploadbox.Locale["es-ES"] during control declaration. To know more about localization support in file explorer, please refer following links.
Online Document link: http://help.syncfusion.com/aspnetmvc -> FileExplorer-> localization and RTL support
Online Sample link: http://mvc.syncfusion.com/demos/web/fileexplorer/localization 
Please let us know if you have any queries.
Regards,
Balamurugan P


DA David August 18, 2015 04:46 PM UTC

Thanks! All work!

Only one question... what is the key word for text when try delete item?

Are you sure want to delete?

I try with  DeleteAlert or RemoveAlert but dont work...




DA David replied to David August 19, 2015 09:47 AM UTC

Thanks! All work!

Only one question... what is the key word for text when try delete item?

Are you sure want to delete?

I try with  DeleteAlert or RemoveAlert but dont work...



One question more...

When donwload file, suddenly appear treeview when setting visibility hide:

 @(Html.EJ().FileExplorer("fileExplorerAttachment")
                .FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx,*.pdf")
                .Path(@Model.FilesPath)
                .AllowMultiSelection(true)
                .Width("100%")
                .Height("200px")
                .AjaxAction("/Operacion/FileActionDefault")
                //.Locale("es-ES")
                .Layout(LayoutType.Grid)
                .IsResponsive(true)
                .ShowContextMenu(false)
                .ShowFooter(true)
                .ShowTreeview(false)
                .UploadBoxSettings(a => a.MultipleFileSelection(true).FileSize(100000000))
                .ToolsList(new List<string>() { "editing" })
                        .Tools(t => t.Editing(new List<string>() { "Refresh", "Upload", "Delete", "Download" }))


                    )

I think is because height of screen change, because in chrome, when you download file, show in bottom place a little toolbar ... any idea?


DA David replied to David August 19, 2015 09:52 AM UTC

Thanks! All work!

Only one question... what is the key word for text when try delete item?

Are you sure want to delete?

I try with  DeleteAlert or RemoveAlert but dont work...



One question more...

When donwload file, suddenly appear treeview when setting visibility hide:

 @(Html.EJ().FileExplorer("fileExplorerAttachment")
                .FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx,*.pdf")
                .Path(@Model.FilesPath)
                .AllowMultiSelection(true)
                .Width("100%")
                .Height("200px")
                .AjaxAction("/Operacion/FileActionDefault")
                //.Locale("es-ES")
                .Layout(LayoutType.Grid)
                .IsResponsive(true)
                .ShowContextMenu(false)
                .ShowFooter(true)
                .ShowTreeview(false)
                .UploadBoxSettings(a => a.MultipleFileSelection(true).FileSize(100000000))
                .ToolsList(new List<string>() { "editing" })
                        .Tools(t => t.Editing(new List<string>() { "Refresh", "Upload", "Delete", "Download" }))


                    )

I think is because height of screen change, because in chrome, when you download file, show in bottom place a little toolbar ... any idea?

Only one more...i try edit my top question but i can't.

I can use a full path? ie: C:/attachment/...  i try but show error message: "it is a physical path, but virtual path is expected."


BP Balamurugan P Syncfusion Team August 19, 2015 02:48 PM UTC

Hi David,

In file explorer control, “DeleteFolder”  is the keyword for mentioning the text in delete alert dialog. So please use this keyword for localizing the text in delete alert dialog.

We are validating the latest queries, we will update you the response by tomorrow. Please let us know if you have any queries.

Regards,

Balamurugan



DA David replied to Balamurugan P August 20, 2015 09:32 AM UTC

Hi David,

In file explorer control, “DeleteFolder”  is the keyword for mentioning the text in delete alert dialog. So please use this keyword for localizing the text in delete alert dialog.

We are validating the latest queries, we will update you the response by tomorrow. Please let us know if you have any queries.

Regards,

Balamurugan


Hi!

Thanks! "DeleteFolder" work!






BP Balamurugan P Syncfusion Team August 20, 2015 12:18 PM UTC

Hi David,

We were able to reproduce the problems(resize / download does not work properly, when we disabled the treeview with responsive support and file explorer does not support physical/ full path. ie C:/attachment/...) and have logged defect report regarding this. A support incident to track the status of these defects has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,

Balamurugan P


Loader.
Live Chat Icon For mobile
Up arrow icon