Issue #416πŸ’¬ AnsweredOpened October 13, 2017by 2uncle-code1 reactions

Image upload with cross Origin issue

Quick answerby 2uncle-code❀ 1

hey,guys sorry to reply this late.I got another project of our company need to update in hurry last week.Anyway,the solution you guys provided works fine after i moved the files in same domain.But if you guys have time please take a look at how we can upload images in cross domain condition.Thanks in advanced! πŸ‘

Read full answer below ↓

Question

I have checked all the issues history,but didin't find a way out. default i changed here to allow fetch to cross origin access. my asset manager is fine default and here is my php code default also file uploaded successed default

but it shows me those errors default and this is my console log default

Answers (3)

2uncle-codeβ€’ October 24, 2017

hey,guys sorry to reply this late.I got another project of our company need to update in hurry last week.Anyway,the solution you guys provided works fine after i moved the files in same domain.But if you guys have time please take a look at how we can upload images in cross domain condition.Thanks in advanced! πŸ‘

mekamleshkβ€’ October 13, 2017

Hi @vtista

The response from your php code should be like this :

[{"type":"image","src":"localhost/test/img/wechat.jpg","height":"350","weight":"250"}],

Trying removing the slashes like this :

echo json_encode($response,JSON_UNESCAPED_SLASHES);

For more reference you can check my code Here

2uncle-codeβ€’ October 13, 2017

@mekamleshk Thanks a lot,i just did as you said,but the issue was still there default

default default do you have any idea? :)

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.