Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

previewAnyFile.previewBase64 error #32

Closed
lethieuluong opened this issue Jul 23, 2021 · 3 comments
Closed

previewAnyFile.previewBase64 error #32

lethieuluong opened this issue Jul 23, 2021 · 3 comments

Comments

@lethieuluong
Copy link

Hi,
I use previewAnyFile.previewBase64 in ionicvue to open base64 pdf like:

      previewAnyFile.previewBase64('data:application/pdf;base64,.......')
      .catch((error: any) => showError(error));

and got this error:
Error: the old format of this exec call has been removed (deprecated since 2.1). Change to: cordova.exec(null, null, 'Service', 'action', [arg1, arg2]);

I know you have a zip file provided for AngularJs as a fix, do you have a fix for Ionicvue, too ? e.g. correct the preview.js in
\android\app\src\main\assets\public\plugins\cordova-plugin-preview-any-file\www

Thanks

@mostafa-mansour1
Copy link
Owner

mostafa-mansour1 commented Jul 23, 2021 via email

@lethieuluong
Copy link
Author

if I use:

window.PreviewAnyFile.previewBase64

I got a compile error:

PreviewAnyFile does not exist on type windows

what I did is:

npm install cordova-plugin-preview-any-file
npm install @ionic-native/preview-any-file
ionic cap sync

what do it need else from code so that window.PreviewAnyFile is usable ? sorry I'm pretty new with this topic. If you offer a support I will ask my company to purchase this. Thanks.

@mostafa-mansour1
Copy link
Owner

mostafa-mansour1 commented Jul 24, 2021 via email

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

No branches or pull requests

2 participants