-
Notifications
You must be signed in to change notification settings - Fork 394
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
[v3] Cors problems when using images with file URI from the Camera plugin and with Cropper.js #258
Comments
For example:
|
I have put together a simple demo repo to reproduce the above 2nd error: https://github.com/peterpeterparker/ionic-webview-camera-cropperjs The error doesn't occurs with Webview v2.3.1 respectively in my app in store but does occurs with Webview v3.0.0 The problem occurs at the following line of Cropper.js when the library try to load the image while using xhr: https://github.com/fengyuanchen/cropperjs/blob/6759d59e288b22095d91656f0868b6a676f638bd/src/js/cropper.js#L162 |
hello. is there any updates? |
Problem is that on v3.0.0 the webserver is disabled and even in v2.3.1 with the security alert it tells you to disable the webserver. Does it help to whitelist app-file in config.xml? |
Use ionic:// for app assets and local files instead of having multiple schemes based on the file type fix ionic-team#258
Use ionic:// for app assets and local files instead of having multiple schemes based on the file type fix ionic-team#258
Use ionic:// for app assets and local files instead of having multiple schemes based on the file type fix ionic-team#258
Use ionic:// for app assets and local files instead of having multiple schemes based on the file type fix ionic-team#258
Use ionic:// for app assets and local files instead of having multiple schemes based on the file type fix #258
# [3.1.0](v3.0.0...v3.1.0) (2019-01-17) ### Bug Fixes * **ios:** Fix video playback of files with uppercase extension ([#264](#264)) ([2c4b225](2c4b225)), closes [#260](#260) * Set engines to require Cordova CLI 7.1.0 or newer ([#276](#276)) ([40f42e1](40f42e1)), closes [#263](#263) * Use a single scheme for all files ([#270](#270)) ([3d1bcdd](3d1bcdd)), closes [#258](#258) ### Features * **Android:** Make app Scheme configurable with a preference ([#274](#274)) ([18d9f2c](18d9f2c)), closes [#269](#269) [#255](#255)
🎉 This issue has been resolved in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I have the same problem in the ionic 4 project. |
Ionic version:
Ionic-Angular v4-RC
Ionic-Native v5.0.0-beta.21
Current behavior:
I try to migrate from v2.3.1 to v3.0.0 and face problems when I use the camera plugin an try to take or upload an image from the gallery respectively I'm not able to display any images from that source anymore
I followed the migration's guide (no custom property, use
convertFileSrc
andallow-navigation
set to*
) and furthermore addedapp-file:
to my csp rulesimg-src
andconnect-src
I face the two following errors:
I tried to set
cross-origin: "anonymous"
as attribute to all<img/>
but it didn't helpedExpected behavior:
As with v2.3.1, I want to be able to use this stack in order to display and manipulate images in my app
Related code:
Camera code: https://github.com/fluster/fluster-app/tree/master/src/app/modals/core/photo-picker
CSP: https://github.com/fluster/fluster-app/blob/master/src/index.html
Config.xml: https://github.com/fluster/fluster-app/blob/master/config.xml
Demo repo
The 2nd problem could be reproduced with the following simple demo repo: https://github.com/peterpeterparker/ionic-webview-camera-cropperjs
The text was updated successfully, but these errors were encountered: