This is a migrated thread and some comments may be shown as answers.

Cannot Delete or Update using Custom Content Provider

1 Answer 79 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Joshua Holmes
Top achievements
Rank 1
Joshua Holmes asked on 02 Apr 2010, 03:03 PM
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...

ISSUE SOLUTION:
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.

1 Answer, 1 is accepted

Sort by
0
Mitch
Top achievements
Rank 1
answered on 11 May 2011, 10:11 PM
Hi Joshua,

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

Thanks,

Mitch

Tags
FileExplorer
Asked by
Joshua Holmes
Top achievements
Rank 1
Answers by
Mitch
Top achievements
Rank 1
Share this question
or