Feature: Dropbox Provider (ManagedCode.Storage.Dropbox)

Purpose

Expose Dropbox as IStorage so .NET apps can use the Dropbox API via a consistent upload/download/list/delete abstraction:

Main Flows

flowchart LR
  App --> DB[DropboxStorage : IDropboxStorage]
  DB --> Client[IDropboxClientWrapper]
  Client --> DropboxAPI[Dropbox API]

Components

DI Wiring

dotnet add package ManagedCode.Storage.Dropbox

Access token (simple):

using ManagedCode.Storage.Dropbox.Extensions;

builder.Services.AddDropboxStorageAsDefault(options =>
{
    options.AccessToken = configuration["Dropbox:AccessToken"];
    options.RootPath = "/Apps/my-app";
});

Refresh token (recommended for production/offline access):

using ManagedCode.Storage.Dropbox.Extensions;

builder.Services.AddDropboxStorageAsDefault(options =>
{
    options.RefreshToken = configuration["Dropbox:RefreshToken"];
    options.AppKey = configuration["Dropbox:AppKey"];
    options.AppSecret = configuration["Dropbox:AppSecret"]; // optional in PKCE flows
    options.RootPath = "/Apps/my-app";
});

Current Behavior

Supported configuration modes:

RootPath scopes all operations (for App Folder apps use /Apps/<your-app>).

Tests

Configuration Notes

See docs/Development/credentials.md and README.md for step-by-step instructions on creating an app, enabling scopes, and obtaining tokens.