Ckeditor uploadimage 404错误/插件设置 [英] Ckeditor uploadimage 404 error / plugin setup

查看:472
本文介绍了Ckeditor uploadimage 404错误/插件设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过拖动'n drop将图像添加到其中。

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

我还是想更新CK编辑器,因此阅读我通过软件包创建了一个新的CKeditor下载,包括插件uploadimage-
http:// ckeditor。 com / addon / uploadimage

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.com/addon/uploadimage

当我尝试在其中拖放图片时,我会看到一个绿色的条,表示上传成功且次数较少然后一秒钟,我在编辑器中看到该图像。
然后显示一个红色条。说:
'在文件上传期间发生HTTP错误(404:未找到文件)。'

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).'

我在ckeditor config.js中有此文件:

I have this in the ckeditor config.js:

config.uploadUrl = '/upload/';

我认为这是上传图像的路径。创建该文件夹并进行测试,我将其权限设置为777。

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.

另一方面,我不需要/不需要文件浏览器。有一点上下文->此编辑器将由登录用户使用。我不希望一个用户能够看到其他用户的图像,而输入文本只能使用一次,因此无需为此特定用途查找较早的图像,该用户只需要使用此编辑器一次即可进行设置。这就是为什么我要确保uploadimage插件最适合我的需要。

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.

亲切的问候,

Martijn

推荐答案

基于文档


uploadUrl 设置包含脚本位置,该脚本处理粘贴和拖动的图像的文件上传

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).

这篇关于Ckeditor uploadimage 404错误/插件设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆