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

Not allowed to load local resource #87

Open
veerasatyanarayana opened this issue Dec 30, 2021 · 2 comments
Open

Not allowed to load local resource #87

veerasatyanarayana opened this issue Dec 30, 2021 · 2 comments

Comments

@veerasatyanarayana
Copy link

XCode 12.4
Cordova 6.0

Load image from local resource and Specifies the path to the image is local resource path

Device file path :
"file:///var/mobile/Containers/Data/Application/CE6CC1DD-2883-4FC8-932D-947242BC5020/Library/NoCloud/Driving_posture_V1_20140924_thumb.jpg "

simulator file path:
"file:///Users/mac2/Library/Developer/CoreSimulator/Devices/A78582B1-7A35-4530-B111-E464C058DCD2/data/Containers/Data/Application/ED800D6A-9E5B-42A5-99C7-56CFFB50B884/Library/NoCloud/Driving_posture_V1_20140924_thumb.jpg "

It work in simulator. But it's fail in device.

I got the below error.

Unhandled Promise Rejection: NotSupportedError: The operation is not supported.

Using the window.resolveLocalFileSystemURL() method check the file existence and it gives an Entry object corresponding to it, as long as that file exists within either the TEMPORARY or PERSISTENT filesystems.

File is existing in the path but not accessible.

@manish2788
Copy link
Member

@veerasatyanarayana Please verify the issue with latest version of plugin and let us know.

@DrMinh
Copy link

DrMinh commented Mar 20, 2023

same problem. I install my plugin version is 3.1. Cross origin requests are only supported for HTTP

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

3 participants