<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help and/or Example with the file upload webscript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274607#M227737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking at the Restful API Reference (&lt;/SPAN&gt;&lt;A href="http://www.alfresco.com/help/33/enterprise/api/" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.com/help/33/enterprise/api/&lt;/A&gt;&lt;SPAN&gt;) and trying to understand how to use the file upload web script. Currently, the api Reference seems severely under documented. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The web script uses the following HTML form data&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this mean the service is expecting (multipart/form-data)? or is it expecting XML or something else?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;filedata - (mandatory) HTML type file&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;What is "HTML type file"? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this web script with the following form, assuming that since filedata is the only marked as mandatory that it would work&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;form method='POST' enctype='multipart/form-data' action='&lt;A href="http://localhost:8080/alfresco/service/api/upload" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/api/upload&lt;/A&gt;'&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File to upload: &amp;lt;input type="file" name="filedata"&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=submit value=Press&amp;gt; to upload the file!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But it returned the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "status" : &lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "code" : 400,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "Bad Request",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "description" : "Request sent by the client was syntactically incorrect."&lt;BR /&gt;&amp;nbsp; },&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; "message" : "Required parameters are missing",&amp;nbsp; &lt;BR /&gt;&amp;nbsp; "exception" : "",&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; "callstack" : &lt;BR /&gt;&amp;nbsp; [ &lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; ],&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; "server" : "Community v3.4.0 (b 3262) schema 4,111",&lt;BR /&gt;&amp;nbsp; "time" : "Mar 18, 2011 3:24:31 PM"&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;What parameters are missing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2011 21:25:27 GMT</pubDate>
    <dc:creator>dallinns</dc:creator>
    <dc:date>2011-03-18T21:25:27Z</dc:date>
    <item>
      <title>Help and/or Example with the file upload webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274607#M227737</link>
      <description>I am looking at the Restful API Reference (http://www.alfresco.com/help/33/enterprise/api/) and trying to understand how to use the file upload web script. Currently, the api Reference seems severely under documented. The web script uses the following HTML form dataDoes this mean the service is expe</description>
      <pubDate>Fri, 18 Mar 2011 21:25:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274607#M227737</guid>
      <dc:creator>dallinns</dc:creator>
      <dc:date>2011-03-18T21:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help and/or Example with the file upload webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274608#M227738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to set all these parameters in your HTML form, as you can see using the WebScripts index:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- filedata, (mandatory) HTML type file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- siteid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- containerid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- uploaddirectory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- updatenoderef&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- filename&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- contenttype&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- majorversion&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- overwrite&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- thumbnails&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The new file must be dropped in one of the Alfresco spaces, this means that you need to set uploaddirectory and the contenttype to specialize the node as you want. The filename is important because Alfresco use this attribute to build the primary path for the content.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another way is based on implementing your own WebScript following the upload form example webscript to customize some behaviour if you need:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2011 14:16:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274608#M227738</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2011-03-26T14:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help and/or Example with the file upload webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274609#M227739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Another way is based on implementing your own WebScript following the upload form example webscript to customize some behaviour if you need:&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can we use this in share ? the "companyhome" is not defined there…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 14:40:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/help-and-or-example-with-the-file-upload-webscript/m-p/274609#M227739</guid>
      <dc:creator>jrott</dc:creator>
      <dc:date>2011-09-20T14:40:27Z</dc:date>
    </item>
  </channel>
</rss>

