Cannot write to the Target Folder !

15 posts, 0 answers
  1. kiran
    kiran avatar
    33 posts
    Member since:
    Aug 2008

    Posted 29 Apr 2009 Link to this post

    Hi Friends,

        Can anyone help me why is this alert message "Cannot write to the Target Folder !"
        displayed when i use Image Editor to resize the image and try to save the file.
        and is there any option to fix this up..

    Thanks


        
  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 29 Apr 2009 Link to this post

    Hi,

    Are you using a custom content provider? If you are, then you have experienced a known bug in the 2009.1 402 RadControls build. It will be fixed in the next service pack release. If you want to get the fix earlier, please open a formal support ticket.

    If you are not using a custom content provider, then please check if you have set the UploadPaths for the image manager dialog correctly. If you have only set ViewPaths, you will not be able to upload new or change files in the Image Manager and Image Editor dialogs.

    All the best,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. kiran
    kiran avatar
    33 posts
    Member since:
    Aug 2008

    Posted 30 Apr 2009 Link to this post

    Thanks for telerik team for faster reply...


    Thanks
  5. Ryan
    Ryan avatar
    16 posts
    Member since:
    Mar 2008

    Posted 30 Apr 2009 Link to this post

    I just ran into the same issue. Do you know when the next release will be?

    Thanks,

    Ryan
  6. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 04 May 2009 Link to this post

    Hi Ryan,

    The release date of SP2 is not yet decided, but you can expect it after the middle of May' 2009.


    Sincerely,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Keith LeBeau
    Keith LeBeau avatar
    51 posts
    Member since:
    Feb 2005

    Posted 05 May 2009 Link to this post

    We have the same problems with builds 428, 429 and 430 (the most current). How has this been a bug since build 402 and still not reached the internal builds as a fix? Opening a support ticket because we absolutely must deploy an update to our customers to fix this issue.
  8. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 08 May 2009 Link to this post

    Hi Keith,

    I attached the latest available internal build of RadEditor v.2000.1.507 to your support ticket. I was not able to reproduce the problem with it. Could you please test it and let us know if you still experience the problem?

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Keith LeBeau
    Keith LeBeau avatar
    51 posts
    Member since:
    Feb 2005

    Posted 08 May 2009 Link to this post

    Build 507 fixed this for us, thanks.
  10. F19
    F19 avatar
    2 posts
    Member since:
    Nov 2008

    Posted 15 May 2009 Link to this post

    Hi,

    I´m implementing a CustomFileProvider and ran into this same issue. Everything so far is working fine (listing files, uploading, previewing, inserting them into the editor and deleting), but when using the Image Editor the ´Save´ button consistently generates this error message ´Cannot write to the target folder!´

    I switched from the official 2009 SP1 release to the latest development build (514) but that didn´t fix the issue.

    In the debugger I can see my constructor is called after pushing the ´Save´ button, but after that the exception occurs before any of the other implemented functions is hit.

    Is this a regression on your end?

    Cheers, Wouter



  11. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 18 May 2009 Link to this post

    Hi Wouter,

    Have you set the UploadPaths property and is the current folder (where the edited image is) included in the UploadPaths? Try Setting UploadPaths="/". This should allow upload in all folders.

    Kind regards,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. F19
    F19 avatar
    2 posts
    Member since:
    Nov 2008

    Posted 18 May 2009 Link to this post

    Thanks for the reply. It was my bad; I only updated the .dll to 514, but apparently your bugfix needed the newer EditorDialogs as well.

    Cheers, Wouter

  13. Jeroen Speldekamp
    Jeroen Speldekamp avatar
    30 posts
    Member since:
    Mar 2005

    Posted 12 Jun 2009 Link to this post

    Hello Telerik,

    According to Lini's post

    Out of Lini's message i understand that in Telerik "v2009.1.527.35" (which i use) this bug has to be solved. As I use a CustomContentProvider I still get the "Cannot write to the Target Folder!" error message.

    The code block below shows you how I configured my ImageEditor

    FileManagerDialogParameters imageEditorParameters = new FileManagerDialogParameters();  
    imageEditorParameters.FileBrowserContentProviderTypeName = typeof(Sunnova.Web.UI.Controls.SunnovaFileStreamContentProvider).AssemblyQualifiedName;  
    imageEditorParameters.ViewPaths = new string[] { "/app_files" };  
    imageEditorParameters.UploadPaths = new string[] { "/app_files" };
    imageEditorParameters.MaxUploadFileSize = 5000000;  
     
    DialogDefinition imageEditor = new DialogDefinition(typeof(ImageEditorDialog), imageEditorParameters);  
    imageEditor.Width = Unit.Pixel(832);  
    imageEditor.Height = Unit.Pixel(540);  
     
    _dialogOpener.DialogDefinitions.Add("ImageEditor", imageEditor); 

    Thanks in advance,
    Jeroen Speldekamp
  14. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 15 Jun 2009 Link to this post

    Hello Jeroen,

    I am not sure what is the problem in your case, but I have a couple of suggestions:

    1) try modifying your View/Upload paths and see if it makes a difference. You can try adding a slash at the end of the path ( "/app_files/") or you can try changing the UploadPaths to a simple  "/".

    2) If you are using version 2009.1.527 or later, you can override the CheckWritePermissions() method from the base content provider class and implement your own logic for checking if a folder should have Upload permissions. The "Cannot write to the Target Folder!" error is raised because this method returned false at some point during the save operation.

    If both of these fail, you can open a formal support ticket and send us a sample project, so we can investigate further.

    Greetings,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  15. sculver
    sculver avatar
    11 posts
    Member since:
    Aug 2009

    Posted 13 Jan 2010 Link to this post

    I am having this same issue, except with the 2009 Q3 release.

    I am using a custom Provider, which runs off an existing DB.  The "Paths" I am sending in are Guid (on purpose) and this approach works for the ImageManger, which I setup using code exactly like this.... its just for the Editor, I get the "Cannot write to the Target Folder!".  I noticed that when I ran this code, it was NOT calling any methods in the CustomProvider before it called this?  Isn't it supposed to?? What might I be doing wrong?

    FileManagerDialogParameters imageEditorParameters = new FileManagerDialogParameters(); 
            imageEditorParameters.ViewPaths = new string[] { "A8A492A1-7381-4690-847E-75F98E24AFA4" }; 
            imageEditorParameters.UploadPaths = new string[] { "A8A492A1-7381-4690-847E-75F98E24AFA4" }; 
            imageEditorParameters.DeletePaths = new string[] { "A8A492A1-7381-4690-847E-75F98E24AFA4" }; 
            imageEditorParameters.MaxUploadFileSize = 5000000; 
            imageEditorParameters.FileBrowserContentProviderTypeName = typeof(CustomImageManagerProvider).AssemblyQualifiedName; 
             
            DialogDefinition imageEditor = new DialogDefinition(typeof(ImageEditorDialog), imageEditorParameters); 
            imageEditor.Width = Unit.Pixel(832); 
            imageEditor.Height = Unit.Pixel(520); 
            doImageDialogSmall.DialogDefinitions.Add("ImageEditor", imageEditor); 
            doImageDialogLarge.DialogDefinitions.Add("ImageEditor", imageEditor); 



  16. Liu Peng
    Liu Peng avatar
    18 posts
    Member since:
    Oct 2006

    Posted 17 Jan 2010 Link to this post

    Hi Sculver:

    I have the same problem with you, after analyze the RadEditor's source code I know that we must override the CheckWritePermissions, the following is the RadEditor's original code:
    /// <summary> 
    /// Checks if the current configuration allows writing (uploading) to the specified folder 
    /// </summary> 
    /// <param name="folderPath">the virtual path that will be checked</param> 
    /// <returns>true if writing is allowed, otherwise false</returns> 
    public virtual bool CheckWritePermissions(string folderPath) 
        //add a ending slash to the upload folder 
        folderPath = folderPath.TrimEnd(PathSeparator) + PathSeparator; 
     
        //compare the upload folder to all paths in the UploadPaths collection and check if it is a child or one of them. 
        //Paths are case-sensitive! 
        foreach (string uploadPath in UploadPaths) 
        { 
            if (!String.IsNullOrEmpty(uploadPath) && folderPath.StartsWith(uploadPath)) 
            { 
                //remove trailing slash from upload path 
                string trimmedUploadPath = uploadPath.TrimEnd(PathSeparator); 
                if (trimmedUploadPath.Length == 0) 
                { 
                    //empty upload path - give permissions everywhere 
                    return true
                } 
                if (folderPath.Length > trimmedUploadPath.Length && folderPath[trimmedUploadPath.Length] == PathSeparator) 
                { 
                    return true
                } 
            } 
        } 
        return false

    My override is this:
    public override bool CheckWritePermissions(string folderPath) 
        return true

    Regards,
    LP
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017