Suneditor: imageGalleryUrl using PHP and not react.

Created on 13 Dec 2020  Â·  5Comments  Â·  Source: JiHong88/SunEditor

hey guys I have looked over the documentation here and I don't particularly want to start the react server, instead I wish to use a PHP or Perl script within a local DIR and a script that produces the JSON output required, I have completed this part of the program and it outputs the JSON format the same as S3 and/or as expected here.

Screenshot_2

However, when I point the imageGalleryUrl at the PHP output URL it does not work? but switch back to your repository and it does.
Am I missing something any help would be appreciated :)

obviously blurred out URL for the demo output image above? I also should point out that I need the same image gallery for other projects (i.e. a bulletin board) with different commands, I prefer to code in either PHP or Perl and I would like to update the java files with minimal alterations to your code from time to time, if there is no other option then please let me know, the syntax of java slows me down QUITE A LOT but I am OK at a push :) my ideal is to create the gallery in PHP or Perl for a back-end process.

Paul

question

Most helpful comment

Good catch something simple like a lowercase "R" :1st_place_medal:

it's working great now............ really surprised I missed that.........

Thanks :)

All 5 comments

Note: I have also replicated the headers sent by the server to exclude gzip and chunked headers just in case.

@dreamsight Sorry, for the late reply.😢
The question did not understand well.
Could you please explain again?
I don't know PHP or Perl.

Hi thanks
I apologise :) OK, one of the settings in the config (SUNEDITOR.create) points to i.e.:
imageGalleryUrl: 'https://etyswjpn79.execute-api.ap-northeast-1.amazonaws.com/suneditor-demo',
where JavaScript downloads a list of images and their locations in JSON format.

I want this setting to point to:
imageGalleryUrl: 'https://oursight.co.uk/our-own-script/for-our-own-image-list’,
Yet this does not work? The output from my script is exactly the same format i.e. JSON as on amazonaws.com including the headers sent by the server itself.

I may have missed something i.e. a setting in your script? For instance, Does the editor JavaScript query another port on the amazonaws.com server? is there an encrypted key i am missing?

in theory the above should work without headers or any keys?

Yeah; I don't really do java and avoid it as much as possible but this problem is not necessarily restricted to my language but the way your code downloads and processes JSON, could be a formatting problem but I have replicated the output from the amazonaws.com server I have tried minimized format as well.

if it helps I can create either a virtual or dedicated server so you can test this yourself and replicate the error.

I would prefer not to advertise the server location publicly :+1:

Regards
Paul

@dreamsight It must work, if same response data.
Um.. Try write "Result" in lowercase.

{
 statusCode: 200,
 Result: =>> result:
  ...
}

Good catch something simple like a lowercase "R" :1st_place_medal:

it's working great now............ really surprised I missed that.........

Thanks :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

redone80 picture redone80  Â·  4Comments

vn516726 picture vn516726  Â·  3Comments

guido-visser picture guido-visser  Â·  3Comments

davidkonrad picture davidkonrad  Â·  4Comments

Saeeed-B picture Saeeed-B  Â·  7Comments