Skip to content

Conversation

@hamrak
Copy link

@hamrak hamrak commented Jun 20, 2025

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.

Issue: #10

@hamrak hamrak changed the title Add getUrl() method #10 Add getUrl() method Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant