No Login Data Private Local Save

Web Share Level 2 Tester - Online Share Files

8
0
0
0

Web Share Level 2 Tester

Test the Web Share API & file sharing capabilities in your browser

Online Share Files Tester
Secure Context
Checking... HTTPS or localhost required
Web Share API
Checking... navigator.share()
canShare()
Checking... navigator.canShare()
Level 2 (Files)
Checking... File sharing support
Share Content Test Level 1
File Share Test Level 2

Select files to test Web Share Level 2 file sharing. Supported types include images, PDFs, audio, video, and text files.

Drag & drop files here

or click to browse

Images, PDF, audio, video, text, code files
Test Log
--:--:-- 🟢 Tool initialized. Awaiting tests...
Browser Compatibility
Browser Basic Share File Share (L2) Notes
Chrome 89+ ✔ Supported ✔ Supported Desktop & Android
Edge 89+ ✔ Supported ✔ Supported Chromium-based
Safari 15+ ✔ Supported ✔ Supported iOS & macOS
Firefox 96+ ✔ Supported ⚠ Partial Limited file support
Samsung Internet ✔ Supported ✔ Supported Android only
Opera 75+ ✔ Supported ✔ Supported Chromium-based
iOS Safari 15+ ✔ Supported ✔ Supported Full file sharing
Frequently Asked Questions

Web Share API Level 2 extends the original Web Share API by adding file sharing capabilities. While Level 1 allows sharing URLs, text, and titles, Level 2 lets websites share actual files (images, PDFs, audio, video, etc.) directly through the operating system's native share dialog—without uploading files to any server first.

Use navigator.canShare() with a files array to test support: navigator.canShare({files: [new File([], 'test.txt')]}). This returns true if the browser supports file sharing. You should always call canShare() before invoking navigator.share() to avoid unexpected errors and provide a smooth user experience.

Common reasons include: (1) Not in a secure context (requires HTTPS or localhost). (2) The share action wasn't triggered by a user gesture (click, tap). (3) No share targets are available on the system. (4) The file type or size is not supported by the target app. (5) The Promise was rejected because the user cancelled the share dialog. Always wrap share() in try-catch and check canShare() first.

Supported file types depend on the OS and target application. Generally, images (JPEG, PNG, GIF, WebP, SVG), PDFs, audio (MP3, WAV), video (MP4), and text files (.txt, .csv, .json) are well-supported. Some platforms also support .zip archives. Always use navigator.canShare({files: [...]}) to validate specific files before attempting to share them.

Yes. Web Share API requires a secure context—the page must be served over HTTPS or from localhost (during development). This is a security requirement to prevent malicious sites from triggering system-level share dialogs without user awareness. You can check window.isSecureContext in JavaScript to verify.

There is no hard limit defined by the Web Share API specification. However, the underlying operating system and target application may impose their own limits. For example, sharing via messaging apps typically limits files to 10–100 MB. For best results, keep shared files under 10 MB to ensure broad compatibility across share targets.

Yes! Chrome, Edge, and Safari on desktop all support Web Share API (including Level 2 file sharing in recent versions). However, the share dialog may show fewer target apps compared to mobile devices. On desktop, sharing typically works with installed PWAs, email clients, and nearby devices. If no share targets are available, share() may reject with an error.

Traditional file upload requires sending files to a server first, generating a link, and then sharing that link. Web Share API bypasses the server entirely—files go directly from the user's device to the target app via the OS share sheet. This means faster sharing, better privacy (files never touch your server), and a native user experience that matches platform conventions.

If navigator.canShare() returns false, you should not call navigator.share() as it will likely fail. Instead, provide a fallback—such as copying the data to clipboard, showing a manual download button, or displaying a QR code. Always design your UI to gracefully handle cases where Web Share is unavailable.

Absolutely! Web Share API is especially powerful in PWAs. When a PWA is installed, it often appears as a share target itself, and the share dialog integrates seamlessly with the OS. PWAs can also use the Web Share Target API to receive shared files from other apps, creating a complete sharing ecosystem entirely on the web platform.