Can not write to target folder with Image editor

5 posts, 1 answers
  1. shadow
    shadow avatar
    58 posts
    Member since:
    Jun 2008

    Posted 11 Dec 2012 Link to this post


    I am having several issues with ImageEditor.
    Here is how I have configured it,
    • External Dialogs
    • CustomContentProvider
    • Uploading Images in directory instead of saving them in database.

    • Can not save to target directory
    • Images are not refreshed in image manager after image is saved.

    After editing some image when I click the save button, it gives the alert ("Can not save to target directory.") and after clicking the save button fourth time the message doesn't appear and image is saved, but now the Image is not refreshed in ImageManager. If I clear the browser cache then the edited image is displayed in image manager!!

    My target folder is configured as a separate virtual directory. 
    Reason for making it a separate virtual directory is that we have some other modules who manipulate files (upload/delete) which leads to user session time outs when they delete some file. We also want to keep user files away from our actual web due to the size of the project. But this virtual directory is under same domain as a sub domain.
    e.g and files folder is

    I am fighting with these issue now from last one month, explored several forum posts and tried what I have figured out... Can you please help me to fix these issues???

    Thank you all.  
  2. shadow
    shadow avatar
    58 posts
    Member since:
    Jun 2008

    Posted 11 Dec 2012 Link to this post

    Empty string passed to getElementById().

    Upon saving this error is generated in firefox..!!!
  3. Answer
    Vessy avatar
    2169 posts

    Posted 14 Dec 2012 Link to this post

    Hi Farid,

    The image-caching problem is not directly related to RadEditor but is a default browser behavior. You are not seeing the modified image because the browser is displaying a cached one - that is why we recommend to save the modified images under new name.

    That behavior could be workarounded by appending some random string to the src portion of the img tag to each image which is used in the editor. For example, you can implement the extra random parameter to the image URL by modifying the line 300 of the dialogs code to match the following one:
    var src = item.get_url() + "?rnd=" + Math.random();

    In the following article you could find detailed information on how to modify RadEditor's built-in dialogs:
    Customize Built-in Dialogs. However, this change will cause the dialog to download the image everytime an image is selected and will slow down the performance.

    Regarding the issue with target folder, most probably is due to permission restrictions. Could you try the test from the following help article to check if the application have read / write permissions on the server:

    Unfortunately, I was not able to reproduce the problem that you have shared in your latest post. Most probably it is connected with the additional in your code so in order to be able to provide more to the point answer I will need to examine and debug it locally. Could you prepare a sample fully runnable project reproducing the issue? You could see how to isolate such in the following link: Isolating a problem in a sample project.

    the Telerik team
    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 their blog feed now.
  4. Manoj
    Manoj avatar
    4 posts
    Member since:
    May 2012

    Posted 12 Jul 2013 Link to this post


     The below code i have kept  for rad image editor . It is executing  but the problem is not saving the croped image in my target folder . It is saving  the actual image  in my folder.

     protected void RadImageEditor1_ImageSaving(object sender, ImageEditorSavingEventArgs e)

            string imgeinfo = "~/ProfilePictures/" + filename ;

    Please help me...
  5. shadow
    shadow avatar
    58 posts
    Member since:
    Jun 2008

    Posted 12 Jul 2013 Link to this post

    I was able to fix this issue, It was related to the browser cache as you said. 

    Fix:  I am not sure if it was a good solution but it worked :P I am appending a query string after the name of the file for example 


    And increasing this number every time user saves the image. It forces the browser to load new image every time ;)
Back to Top