最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Ckeditor uploadimage 404 errorplugin setup - Stack Overflow

programmeradmin3浏览0评论

I'm trying to add the adding of images into with the editor, with drag 'n drop.

I wanted to update CK editor anyway, so after some reading I created a new CKeditor download via the package building, including the plugin uploadimage -

When I try to drag 'n drop an image in it, I'll see a green bar saying upload succesful and for less then a second I see the image in the editor. Then a red bar is showing. saying: 'HTTP error occurred during file upload (404: File not found).'

I have this in the ckeditor config.js:

config.uploadUrl = '/upload/';

As I assumed this was the path were the images are uploaded. The folder is created and for testing I have set its permissions to 777.

As this is not working I assume I did something wrong here, or that I'm missing something in the configuration. But via the documentation I don't see what it might be.

I hope someone can point me in the right direction.

On a side note, I do not need/want a file browser. A little context -> this editor will be used by logged in users. I do not want one user be able to see images from the other and the input text in only used once, so no need to find earlier images as for this particular use the user will only use this editor once for setup. This is why I tought the uploadimage plugin would fit best for my needs.

Kind regards,

Martijn

I'm trying to add the adding of images into with the editor, with drag 'n drop.

I wanted to update CK editor anyway, so after some reading I created a new CKeditor download via the package building, including the plugin uploadimage - http://ckeditor./addon/uploadimage

When I try to drag 'n drop an image in it, I'll see a green bar saying upload succesful and for less then a second I see the image in the editor. Then a red bar is showing. saying: 'HTTP error occurred during file upload (404: File not found).'

I have this in the ckeditor config.js:

config.uploadUrl = '/upload/';

As I assumed this was the path were the images are uploaded. The folder is created and for testing I have set its permissions to 777.

As this is not working I assume I did something wrong here, or that I'm missing something in the configuration. But via the documentation I don't see what it might be.

I hope someone can point me in the right direction.

On a side note, I do not need/want a file browser. A little context -> this editor will be used by logged in users. I do not want one user be able to see images from the other and the input text in only used once, so no need to find earlier images as for this particular use the user will only use this editor once for setup. This is why I tought the uploadimage plugin would fit best for my needs.

Kind regards,

Martijn

Share Improve this question asked Oct 27, 2016 at 10:35 marty90marty90 1031 gold badge2 silver badges11 bronze badges 4
  • Open the developers tool bar and check for errors in the console. Without the exact error it will be hard to help. – Dekel Commented Oct 27, 2016 at 10:43
  • The requested URL /upload/ was not found on this server. When putting the full url instead of just /upload/ doesn't work. Then I was thinking it might search inside the folder ckeditor, so created a folder upload there with 777 permissions, but no luck. – marty90 Commented Oct 27, 2016 at 13:07
  • You should read the documentation: docs.ckeditor./#!/guide/dev_file_upload – Dekel Commented Oct 27, 2016 at 13:36
  • When I add the full url, it gives a different error: [CKEDITOR] Error code: filetools-response-error. Object { responseText="" The documentation keeps refering to a upload.php... I do not see any or have any clue as to what needs to be in here. (I created a upload.php and set the imageUploadUrl) If i put 'TEST 1..2..3' in the upload.php the above error shows that as the response text... – marty90 Commented Oct 27, 2016 at 15:33
Add a ment  | 

1 Answer 1

Reset to default 5

Based on the documentation of ckeditor:

The uploadUrl setting contains the location of a script that handles file uploads of pasted and dragged images

This is not the folder in your server that you want to upload the files to. This should be the script that handles the submit of the file that should be uploaded, and this script is the one who handle the saving of the file in the relevant folder on the server.

This plugin only covers the client side (what happen in the browser) and not the server side (which you need to implement by yourself).

发布评论

评论列表(0)

  1. 暂无评论