Image Manager File Delete not working

7 posts, 0 answers
  1. Vipin
    Vipin avatar
    3 posts
    Member since:
    Sep 2011

    Posted 12 Sep 2011 Link to this post

    Hi,

    I am working on an asp.net project using telerik tools version '2011.2.712.40'. I have customized the Image manager control. I am able to upload files into the blob as well as to store reference into the sql table. But, I am not able to delete a file from the Image Manager control. An error message 'The selected file could not be deleted because the application did not have enough permissions. Please contact the administrator' appears when I am trying to delete a file. In the telerik site, I found the flow of the delete functionality is like,

    1.  GetPath - Gets the parent folder for the deleted item
    2.  ResolveDirectory - Checks permissions
    3.  DeleteFile - Deletes the item
    4.  ResolveRootDirectoryAsTree - Updates the parent tree node
    5.  ResolveDirectory - Updates the parent tree node ResolveRootDirectoryAsTree - Updates the RadGrid
    6.  ResolveDirectory - Updates the RadGrid

    But, Break point is not coming to the 'DeleteFile' method. Please help me.

    Vipin.P.C

  2. Aaron
    Aaron avatar
    7 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post

    Was this problem ever solved?
  3. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 16 Feb 2012 Link to this post

    Hi,

    Do you experience the reported problem with the following provider: Azure FileBrowserContentProvider?

    Regards,
    Rumen
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  4. Aaron
    Aaron avatar
    7 posts
    Member since:
    Feb 2012
  5. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 24 Feb 2012 Link to this post

    Hi,

    The problem reported by Vipin.P.C applies to RadEditor for ASP.NET AJAX, but the problem that you experience is related to Telerik Editor for MVC. These are two different controls which are not related to each other.

    Kind regards,
    Rumen
    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.
  6. Aaron
    Aaron avatar
    7 posts
    Member since:
    Feb 2012

    Posted 24 Feb 2012 Link to this post

    Ok Thanks,
    Do you have any solution for my problem?
  7. William
    William avatar
    4 posts
    Member since:
    Aug 2010

    Posted 14 Nov 2013 Link to this post

    I know that this is an old post, but for what it is worth, what we found we had to do was to override the CheckDeletePermissions function.  This is not in the TelerikAzureContentProvider, so it uses the default method for checking permissions on a folder.  
    Since this is Azure Blob storage, there is no standard directory permissions because there really are no directories, just blobs in a container.  An assembalance of a directory structure can be simulated by using "/" in the blob names, but the fact is the "/" are actually part of the blob name.

    What we do is add to a private variable list, all the paths provided in the deletePaths parameter when the class is new'd up.
    Then in the override of the CheckDeletePermissions, we check to make sure that the path being passed in is in our deletePaths.

        Public Overrides Function CheckDeletePermissions(folderPath As String) As Boolean
            'Return MyBase.CheckDeletePermissions(folderPath)
            If Not IsNothing(DeletePermissionsByFolder) Then
                If DeletePermissionsByFolder.Contains(folderPath) Then
                    Return True
                Else
                    Return False
                End If
            End If
        End Function
Back to Top