I try modify the path to a local folder but it does not work too
@Url.Action("FileActionDefault")
|
Hi Anis,
Sorry for the inconvenience caused.
var serializer
= new FileExplorerOperations operation = new var req = ControllerContext.HttpContext.Request; req.InputStream.Seek(0, SeekOrigin.Begin); var jsonStringData
= new FileExplorerParams args = new
|
Please find the modified sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/127281/ze/File_Explorer.Web-1102198667
Note: Modification was done in “FileExplorerController.cs” file of the attached project.
Please let us know if you require any further assistance.
Regards,
Balamurugan
Hello,
The solution (Path("/FileExplorerContent/") ) give me this error message: "System.IO.DirectoryNotFoundException, Could not find a part of the path 'C:\inetpub\wwwroot\FileExplorerContent'.", and I tested in Chrome v 54.0.2840.71 m (64-bit) and Internet Explorer 11.
Another question: how can I open pdf file from FileExplorer in the browser (pop-up windows or in new windows) ?
Regards,
@(Html.EJ().FileExplorer("fileExplorer")
.FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx, *.pdf")
.Layout(LayoutType.Tile)
.Path(@Url.Content("~/FileExplorerContent/"))
.AjaxAction(@Url.Action("FileActionDefault"))
.Width("100%")
.IsResponsive(true)
.MinWidth("350px")
) |
@(Html.EJ().FileExplorer("fileExplorer")
.FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx, *.pdf")
.Layout(LayoutType.Tile)
.Path(@Url.Content("~/FileExplorerContent/"))
.AjaxAction(@Url.Action("FileActionDefault"))
.Width("100%")
.IsResponsive(true)
.MinWidth("350px")
.ClientSideEvents(eve=>eve.Create("onCreate").BeforeOpen("onBeforeOpen"))
)
<script type="text/javascript">
function onCreate(args) {
this._viewMenuObj.option({
open: function (args) {
this.enableItem("Open");
}
});
}
function onBeforeOpen(args) {
if (args.itemType == "File" && !(/\.(bmp|dib|jpg|jpeg|jpe|jfif|gif|tif|tiff|png|ico)$/i).test(this._selectedFile)) {
//you can get parent path using "args.model.selectedFolder"
//you can get selected file name using "args.model.selectedItems"
var file = args.model.selectedFolder.replace("~", "..") + args.model.selectedItems[0];
window.open(file, args.model.selectedItems[0], '_blank', 'fullscreen=yes, menubar=yes, resizable=yes, titlebar=yes, toolbar=yes');
args.cancel = true;
}
}
</script> |
case "Upload":
opeartion.Upload(args.FileUpload, args.Path);
case "Upload": opeartion.Upload(args.FileUpload, args.Path); |