Hi all.
I am having some issues with CreateNewDirectory. I wanted to create a Web Gallery using FileExplorer based on your demo. Because of using possible big files (4,5 MB and maybe more) I created a thumb directory and when uploading images I resize as well and them upload (resized and original) into 2 different directories (Images and ImagesThumb). In FileExplorer I show only the thumb directory. The DeletePath is defined to both Images and ImagesThumb directory. The images load OK and the memory usage is good. Deleting 2 directories at once or 2 files at once works great. But i have difficulties to create 2 directories.
The ASPX:
CS:
I have created the OnClientCreateNewFolder:
With no luck at all, in ImagesThumb it creates desired folder but in Images not. Then I tried create a second
FileExplorer to handle the Image folder for me like this:
OnCreate event:
Doesnt work either until the createNewDirectory has only 1 parameter and propmts a popup window to provide a name
but that is not desired. I dont want to use ActiveX object to create a directory.
Am I doing something wrong?? Is there a better way to achieve what I need???
Thx
I am having some issues with CreateNewDirectory. I wanted to create a Web Gallery using FileExplorer based on your demo. Because of using possible big files (4,5 MB and maybe more) I created a thumb directory and when uploading images I resize as well and them upload (resized and original) into 2 different directories (Images and ImagesThumb). In FileExplorer I show only the thumb directory. The DeletePath is defined to both Images and ImagesThumb directory. The images load OK and the memory usage is good. Deleting 2 directories at once or 2 files at once works great. But i have difficulties to create 2 directories.
The ASPX:
<telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="1000px" Height="690px" Skin="Black" EnableOpenFile="True" OnClientFolderChange="OnClientFolderChange" OnClientCreateNewFolder="onCreateNewDir" OnClientLoad="OnFileExplorerLoad"> </telerik:RadFileExplorer>CS:
string[] paths = new string[] { "~/ImagesThumb/", "~/Images/" };RadFileExplorer1.Configuration.ViewPaths = new string[] { "~/ImagesThumb/" };RadFileExplorer1.Configuration.UploadPaths = paths;RadFileExplorer1.Configuration.DeletePaths = paths;I have created the OnClientCreateNewFolder:
function onCreateNewDir(sender, eventArgs) { var oExplorer = getRadFileExplorer1(); var dirPath = oExplorer.get_currentDirectory().replace('ImagesThumb', 'Images'); oExplorer.remove_createNewFolder(onCreateNewDir); oExplorer.createNewDirectory(dirPath,eventAgs.get_newPath()); oExplorer.add_createNewFolder(onCreateNewDir);}
With no luck at all, in ImagesThumb it creates desired folder but in Images not. Then I tried create a second
FileExplorer to handle the Image folder for me like this:
<telerik:RadFileExplorer runat="server" ID="RadFileExplorer2"Skin="Black" style="display:none"><Configutation DeletePaths="~/Images" UploadPaths="~/Images" /> </telerik:RadFileExplorer>OnCreate event:
function onCreateNewDir(sender, eventArgs) { var oExplorer = getRadFileExplorer1(); var dirPath = oExplorer.get_currentDirectory().replace('ImagesThumb', 'Images'); getRadFileExplorer2().createNewDirectory(dirPath,eventAgs.get_newPath()); }Doesnt work either until the createNewDirectory has only 1 parameter and propmts a popup window to provide a name
but that is not desired. I dont want to use ActiveX object to create a directory.
Am I doing something wrong?? Is there a better way to achieve what I need???
Thx