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

fetch doesn't support blob images which are CORS. #8422

Closed
asimkt opened this issue Nov 6, 2020 · 3 comments
Closed

fetch doesn't support blob images which are CORS. #8422

asimkt opened this issue Nov 6, 2020 · 3 comments
Labels
package:image package:upload resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team. status:stale type:bug This issue reports a buggy (incorrect) behavior.

Comments

@asimkt
Copy link
Contributor

asimkt commented Nov 6, 2020

📝 Provide detailed reproduction steps (if any)

  1. Upload & copy the uploaded image from https://udaychy.github.io/ImageBlobDemo/. (The idea is the image should be available as a blob)
  2. Now paste the content in any CK Editor. (Products like Confluence page by default converts all images to its local blob after publishing)
  3. Functions like isLocalImage and fetchLocalImage will run from packages/ckeditor5-image/src/imageupload/utils.js, which will in turn call fetch( imageSrc ).
  4. The imageSrc in this case is like blob:https://udaychy.github.io/eea1fe2d-7dcf-48b9-a65c-31306a57ee70

✔️ Expected result

The image should be uploaded/gracefully fail.

❌ Actual result

Getting an alert from fetch API that, TypeError: Failed to fetch and in console we're getting detailed error that:

Fetch API cannot load blob:https://udaychy.github.io/eea1fe2d-7dcf-48b9-a65c-31306a57ee70. URL scheme must be "http" or "https" for CORS request.

So basically fetch API won't work for CORS blob.

📃 Other details

  • Browser: Google Chrome Version 83.0.4103.61 (Official Build) (64-bit)
  • OS: Mac Catalina 10.15.3
  • CKEditor version: 23.0.0
  • Installed CKEditor plugins: EasyImage

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@asimkt asimkt added the type:bug This issue reports a buggy (incorrect) behavior. label Nov 6, 2020
@Mgsy Mgsy added the squad:core Issue to be handled by the Core team. label Jan 5, 2021
@LukaszGudel
Copy link
Contributor

PR #8707 is not fixing this issue. Additionally instead of alert with message TypeError: Failed to fetch it's now printing [object Event]. Also, when running paste-from-word manual test with changes from PR and following steps from this issue there is additional error in the console:

integration.html:1 
Not allowed to load local resource: blob:https://udaychy.github.io/978c8ea9-4dc7-4f43-aa5d-d6c483ff54b9 

@Reinmar Reinmar added this to the backlog milestone Jan 18, 2021
@pomek pomek removed this from the backlog milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added the resolution:expired This issue was closed due to lack of feedback. label Nov 14, 2023
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image package:upload resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team. status:stale type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

6 participants