Dojo 1.7 localImage插件问题 [英] Dojo 1.7 localImage Plugin Issue

查看:241
本文介绍了Dojo 1.7 localImage插件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文章发布页面上使用Dojo Editor工具。我试图测试LocalImage插件,我有一些问题。该插件加载正常,但是当我尝试从我的电脑选择一个图像上传到服务器它给我一些问题。



首先:在我的电脑上选择本地图像后,它不会列出完整的文件路径。它只会列出文件名。所以代替C:\pic.jpeg它只显示pic.jpeg。如果我点击插入Firebug给出错误和警告。
NetworkError:404未找到 -



editArticle.php

 < div data- dojo-type =dijit.Editorid =editorContent
data-dojo-props =extraPlugins:[{name:'LocalImage',uploadable:true,uploadUrl:'../../ .. /images/articles/UploadFile.php',baseImageUrl:'../../../images/articles/',fileMask:'* .jpg; *。jpeg; *。gif; *。png; *。bmp '}],
onChange:function(){dojo.byId('content')。value = this.getValue();}name =editorContentplaceholder =文章的HTML内容需要maxlength =100000style =padding:0;><?ph p echo $ results ['article'] - > content?>
< / div>

UploadFile.php

 $ code $ $ upload_path =../articles/uploads/; 
$ download_path =../articles/uploads/;
require(JSON.php);
$ json = new Services_JSON();

cLOG.php正在生成的upload.txt中显示。

  [12.04.13 1.03.32]:POSTDATA:1个文件
[12.04.13 1.03.32]:
[12.04 .13 1.03.32]:file:uploadedfile = Array
[12.04.13 1.03.32]:HTML单POST:
[12.04.13 1.03.32]:
[12.04.13 1.03.32]:file:../articles/uploads/test.jpeg
[12.04.13 1.03.32]:Json数据返回:
[12.04.13 1.03.32]:{file : .. \ / articles\ / uploads\ / test.jpeg, 名称: test.jpeg, 宽度:空, 高度:空, 类型: JPEG ,size:false,additionalParams:[]}

请帮助noob! p>

解决方案

通过更改服务器文件夹权限来修正!


I am using Dojo Editor tools for an article publishing page. I'm trying to test the LocalImage plugin and I am having some issues. The plugin loads fine, but when I try to select a image from my computer to upload to the server it give me some issues.

First: After I select the local image on my computer it does not list the full file path. It only will list the file name. So instead of C:\pic.jpeg it only shows pic.jpeg. If I click insert Firebug gives an error and a warning. "NetworkError: 404 Not Found - http://XXX.XXX.XXX.XXX/images/articles/uploads/test.jpeg" Use of attributes' nodeValue attribute is deprecated. Use value instead.

Second: I try to then type in the local path myself c:\pic.jpeg. No errors this time. However, only the Description title shows with anchors. Also the same warning from above.

If I use a URL of a picture it works fine.

I tried to follow the documentation on this page: http://dojotoolkit.org/reference-guide/1.7/dojox/editor/plugins/LocalImage.html

editArticle.php

            <div data-dojo-type="dijit.Editor" id="editorContent" 
            data-dojo-props="extraPlugins:[{name: 'LocalImage', uploadable: true, uploadUrl: '../../../images/articles/UploadFile.php', baseImageUrl: '../../../images/articles/', fileMask: '*.jpg;*.jpeg;*.gif;*.png;*.bmp'}], 
            onChange:function(){dojo.byId('content').value = this.getValue();}" name="editorContent" placeholder="The HTML content of the article" required maxlength="100000" style="padding:0;"><?php echo $results['article']->content ?>
        </div>

UploadFile.php

    $upload_path = "../articles/uploads/"; 
$download_path = "../articles/uploads/";
require("JSON.php");
$json = new Services_JSON();

cLOG.php is working and shows this in the generated upload.txt.

[12.04.13 1.03.32]: POSTDATA: 1 FILES
[12.04.13 1.03.32]: 
[12.04.13 1.03.32]:    file: uploadedfile=Array
[12.04.13 1.03.32]: HTML single POST:
[12.04.13 1.03.32]: 
[12.04.13 1.03.32]: file: ../articles/uploads/test.jpeg
[12.04.13 1.03.32]: Json Data Returned:
[12.04.13 1.03.32]: {"file":"..\/articles\/uploads\/test.jpeg","name":"test.jpeg","width":null,"height":null,"type":"jpeg","size":false,"additionalParams":[]}

Please help a noob!

解决方案

Fixed it by changing the server folder permissions!

这篇关于Dojo 1.7 localImage插件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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