admin 管理员组文章数量: 1086019
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
1 Answer
Reset to default 5Based 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).
本文标签: javascriptCkeditor uploadimage 404 errorplugin setupStack Overflow
版权声明:本文标题:javascript - Ckeditor uploadimage 404 errorplugin setup - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744070833a2528452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论