xcarpentier / rn-pdf-reader-js

📄 PDF reader in JavaScript only for Expo - Android & iOS capable
MIT License
388 stars 164 forks source link

how to use relative path, #161

Closed echolove38 closed 2 years ago

echolove38 commented 2 years ago

the following is my code: Asset.fromModule(require('../../../assets/big_buck_bunny.mp4')).uri but can't run. so , how to use local assets file

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SiddheshNan commented 1 year ago

Hello, I have used the following to read the local asset file: const file = Asset.fromModule(require("../docs/myfile.pdf")); file.downloadAsync().then((doc) => { setState({ localFilePath: doc.localUri }); })