StarHosea commented on issue #316:
URL:
https://github.com/apache/cordova-plugin-file/issues/316#issuecomment-1293346768
> @chr15m This is the way. Thanks for the hint.
>
> FYI what I did in my index.html:
>
> ```
> <script>
> window.File_native = window.File; // backup the native File api
because cordova-plugin-file clobbers it.
> </script>
> <script type="text/javascript" src="cordova.js"></script>
> ...
> ```
>
> And when I needed to use the native File API in js:
>
> ```js
> let File = window.File;
> if ("File_native" in window) { //
cordova-plugin-file clobbers File(), so we backed it up at the beginning of
index.html before loading cordova.js
> // @ts-ignore
> File = window["File_native"];
> }
> let otaBinary = new File([theBlob], fname);
> ```
Tried like this, sometimes work fine, sometimes not , i didn't know why
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]