Skip to content

Add getUrl method #10

Description

@hamrak

The getUrl method generates a data URL for a file stored on the SMB share. It reads the file, detects its MIME type, and returns a string that embeds the file content as a base64-encoded data URL.

Why create it:
This method allows users to easily retrieve SMB-stored files as data URLs, which can be directly embedded in web pages or APIs without needing a public HTTP endpoint or temporary file. It simplifies file sharing and previewing, especially for web applications.

Provides a standard way to get file contents as a data URL, matching features in other Flysystem adapters.
Enables seamless integration with web frontends and APIs that expect data URLs.
Reduces the need for additional file hosting or proxying solutions when working with SMB shares.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions