diff --git a/js-miniapp-sample/src/assets/sample.mp3 b/js-miniapp-sample/src/assets/sample.mp3 deleted file mode 100644 index 23c2e3aaa..000000000 Binary files a/js-miniapp-sample/src/assets/sample.mp3 and /dev/null differ diff --git a/js-miniapp-sample/src/assets/sample.zip b/js-miniapp-sample/src/assets/sample.zip deleted file mode 100644 index 3f94fee38..000000000 Binary files a/js-miniapp-sample/src/assets/sample.zip and /dev/null differ diff --git a/js-miniapp-sample/src/pages/file-download.js b/js-miniapp-sample/src/pages/file-download.js index 3cdc85455..f10d270da 100644 --- a/js-miniapp-sample/src/pages/file-download.js +++ b/js-miniapp-sample/src/pages/file-download.js @@ -132,7 +132,10 @@ const FileDownload = (props: FileDownloadProps) => { color="primary" onClick={() => // $FlowFixMe - onDownloadFile(require('../assets/images/panda.png'), 'panda.png') + onDownloadFile( + 'https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_100kB.jpg', + 'sample.jpg' + ) } > Download Image @@ -145,7 +148,10 @@ const FileDownload = (props: FileDownloadProps) => { color="primary" onClick={() => // $FlowFixMe - onDownloadFile(require('../assets/sample.zip'), 'sample.zip') + onDownloadFile( + 'https://file-examples-com.github.io/uploads/2017/02/zip_2MB.zip', + 'sample.zip' + ) } > Download ZIP @@ -158,12 +164,48 @@ const FileDownload = (props: FileDownloadProps) => { color="primary" onClick={() => // $FlowFixMe - onDownloadFile(require('../assets/sample.mp3'), 'sample.mp3') + onDownloadFile( + 'https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3', + 'sample.mp3' + ) } > Download MP3 + + + + + + + + +

{!isPermissionGranted && '"FILE_DOWNLOAD" permission not granted.'}