[opencms-dev] External upload to opencms

Vlachogiannis Evangelos evlach at aegean.gr
Wed Sep 24 22:45:02 CEST 2003


Hi all,

I would like to create a form outside opencms for uploading and publishing
(by default) a file for local file system. 

I used the opencms browser for exploring the vfs and onclick update a
textfield where to store in vfs. Then I used from upload forms some fields
etc and here is the result:

-----------

<form id="UPLOAD" name="UPLOAD"
action="/opencms/opencms/system/workplace/action/explorer_files_new_upload.h
tml" method="POST" ENCTYPE="multipart/form-data" onsubmit="doSubmit();return
true;" >
  
  <INPUT type="hidden" NAME="STEP" ID="STEP" value="2">
  
  Upload file <br>
  Location 
  <input name="newresource" type="text" id="newresource">
  <a
href="javascript:treewin=opensmallwin('/opencms/opencms/system/workplace/act
ion/folder_tree.html?foldertree=%2F&formname=UPLOAD&variable=newresource&onl
ineselect=no&viewfile=yes', 'explorer_viewer', 150, 300),treewin.focus();"> 
  <img src="/opencms/resources/ic_file_folder.gif" border="0" alt="Select
folder..."></a><br>
  Resource 
  <input size="30" maxlength="30" type="file" id=DATEINAME name=DATEINAME
onFocus="enableContinue();">
  <br>

<table border=0 width=100%>
    <tr>
<td align=middle width=5%><INPUT type ="radio" id=newtype name=newtype
value="binary" checked></td>
<td align=middle width=10%><IMG src="/opencms/resources/ic_file_binary.gif"
border=0 width=16 heigth=16></td>
<td align=left>Binary</td>
</tr><tr>
<td align=middle width=5%><INPUT type ="radio" id=newtype name=newtype
value="plain" ></td>
<td align=middle width=10%><IMG src="/opencms/resources/ic_file_plain.gif"
border=0 width=16 heigth=16></td>
<td align=left>Text</td>
</tr><tr>
<td align=middle width=5%><INPUT type ="radio" id=newtype name=newtype
value="image" ></td>
<td align=middle width=10%><IMG src="/opencms/resources/ic_file_image.gif"
border=0 width=16 heigth=16></td>
<td align=left>Image</td>
</tr>
</table>  
  
  <input type=checkbox id="unzip2" name="unzip">
   unzip file <br>
<INPUT class=button width=100 type="submit" value="Finish" id=FERTIG
name=FERTIG onClick="location='explorer_files_new_upload.html';">
##  <input disabled class=button width=100 type="submit" value="Continue >>"
id=WEITER2 name=WEITER onClick="location=baseurl;">
</form>

------

Unfortunately this is not uploading the file. I cannot find where should I
set in the form the target location..?? Any help or alternative solution
please??

Thnx in advance
--------------------------------------------
Evangelos Vlachogiannis
Researcher - PhD. Candidate
Dept. of Products and Systems Design (http://www.syros.aegean.gr) University
of the Aegean (http://www.aegean.gr) 
Syros - Greece 
........................................................................
Phone: +32281-097126
Mob: +3697-6560466
FAX: +32281-097009
e-mail: evlach at aegean.gr
Web: http://www.syros.aegean.gr/users/evlach
--------------------------------------------



More information about the opencms-dev mailing list