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!