Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ionic-team/capacitor-file-viewer

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

capacitor-file-viewer

Logo

@capacitor/file-viewer

The FileViewer API provides mechanisms for opening files and previewing media. Not available on web.
🔌 Cordova Plugin · 🤖 Android Library · 🍏 iOS Library

🐛 Report Bug · 💡 Request Feature

Install

npm install @capacitor/file-viewer
npx cap sync

Example

import { FileViewer } from "@capacitor/file-viewer";

// can use a plugin like @capacitor/filesystem to get the full path to the file
const openDocument = async () => {
  await FileViewer.openDocumentFromLocalPath({
    path: "path/to/file.pdf"
  });
};

// ios-specific
const previewMedia = async () => {
  await FileViewer.previewMediaContentFromUrl({
    path: "https://url_hosting_media/file.mp4"
  });
}

API

Check the plugin's api here.

About

File Viewer plugin for Capacitor ⚡️

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.