TinyMCE MultiCloud Plugin - v0.1.1
    Preparing search index...

    Interface CloudProvider

    Contract that every cloud provider adapter must implement. Built-in providers are in src/providers/. Custom providers can be added by the integrator.

    Salvatore Callari Callari@WaXCode.net

    interface CloudProvider {
        id: CloudProviderId;
        label: string;
        pick: (context: CloudProviderContext) => Promise<PickerResult | null>;
        upload?: (
            context: CloudProviderContext,
            file: File,
        ) => Promise<PickerResult | null>;
    }
    Index

    Properties

    Properties

    Unique identifier for this provider (e.g. "googleDrive").

    label: string

    Human-readable label shown in the picker dialog (e.g. "Google Drive").

    pick: (context: CloudProviderContext) => Promise<PickerResult | null>

    Opens the provider's file picker and returns the user's selection, or null if the user cancelled.

    Type Declaration

    If the picker fails (popup blocked, SDK error, timeout, etc.).

    upload?: (
        context: CloudProviderContext,
        file: File,
    ) => Promise<PickerResult | null>

    Uploads a file to the provider's storage and returns the result, or null on cancellation. Optional — providers that do not support upload should omit this method.

    Type Declaration

    If the upload fails.