[opencms-dev] External_new_upload

Vlachogiannis Evangelos evlach at aegean.gr
Tue Oct 7 00:58:01 CEST 2003


Hi all,

I am trying to upload/unlock/publish a resource at once from outside
jetspeed. I have created a class/action/template (attached) like
CmsNewResourceUpload containing the following code:

cms.loginUser("admin","admin");
System.out.println("trying to create...");
cms.createResource(currentFolder + filename, type.getResourceTypeName(), new
Hashtable(), filecontent, null);
System.out.println("created...");
cms.unlockResource( currentFolder + filename );
cms.publishResource( currentFolder + filename);	

What I am getting is no uploaded file and the following console message:

step: 2
filename: New_Text_Document.txt
currentFolder: /release/
title: null
newtype: plain
overwrite: false
cancel: false
Step2@@@@@@@@@
logged in suc
trying to create...
com.opencms.core.CmsException: 1 Access denied. Detailed error:
[com.opencms.file.mySql.CmsResourceBroker]
/default/vfs/release/New_Text_Document.txt.

Could anyone help me please?

Thnx in advance,
Vangelis


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20031007/5100cea2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExternalCmsNewResourceUpload.java
Type: application/octet-stream
Size: 18790 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20031007/5100cea2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: external_new_upload
Type: application/octet-stream
Size: 13945 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20031007/5100cea2/attachment-0001.obj>


More information about the opencms-dev mailing list