Cannot Delete or Update using Custom Content Provider

2 posts, 0 answers
  1. Joshua Holmes
    Joshua Holmes avatar
    2 posts
    Member since:
    Jan 2010

    Posted 02 Apr 2010 Link to this post

    I am building a custom content provider to allow FileExplorer to use RackSpace CloudFiles.  So far, I've been able to get it to list directories and contents flawlessly.  However, there seems to be an issue uploading and deleting files (objects).

    In my provider class I have the required "DeleteFile" method (really you guys should have a Interface to implement, NOT a class to inherit) however the DeleteFile method is never called when deleting, same goes for the StoreFile method when uploading.

    Instead I get the following error: The selected file could not be deleted because the application did not have enough permissions.  Please contact system administrator

    I have checked and the Delete and Upload paths are set correctly, and ViewState is turned on as well, but no matter what I do, the FileExplorer never actually calls the Content Provider methods...

    The solution is pretty simple... I did not have an overriding method in my provider for "CheckDeletePermissions" method.  Unfortunately because these providers are setup to Inherit a base provider instead of Implementing an Interface there is nothing to "force" me as a programmer to implement all MANDATORY overrides... I guess it's a matter of preference but I enjoy using Interfaces, they do a great job of enforcing correct programming for providers.

    At at any rate, I have implemented this override method and not instead of calling the base provider class for Deleting it's calling the customer provider on delete instead.  I will also assume that overriding "CheckWritePermissions" will also take care of my uploading issue.

    Happy Coding, good luck to the rest of you.
  2. Mitch
    Mitch avatar
    3 posts
    Member since:
    Sep 2007

    Posted 11 May 2011 Link to this post

    Hi Joshua,

    Are you fully implemented into Rackspace Cloud Files?  I'm looking for a solution for FileExplorer into Cloud Files.



Back to Top