<?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 Re: Upload File with DoclibAction in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-file-with-doclibaction/m-p/132099#M35636</link>
    <description>&lt;P&gt;The Forms framework is not designed to handle file uploads at all - both on the client and the server-side. So there is no way to support this unless you use some custom dialog handling code on the client (which may still use the form definition to render the form UI) which calls a custom web script endpoint to accept the parameters, including the file upload, which also requires some custom submit handling code to properly transfer to that endpoint.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 10:16:51 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-06-01T10:16:51Z</dc:date>
    <item>
      <title>Upload File with DoclibAction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file-with-doclibaction/m-p/132098#M35635</link>
      <description>&lt;P&gt;Hi Everyone !&lt;/P&gt;&lt;P&gt;I work with this alfresco version : All-In-One (AIO) project for SDK 4.0&lt;BR /&gt;I would like to upload a file with DocLibAction but in Java part, I receive this value : {pdf-document-upload=C:\fakepath\pom.xml}&lt;/P&gt;&lt;P&gt;add-doclib-actions-extension-modules.xml&lt;BR /&gt;========================================&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="upload-pdf"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&amp;lt;show id="pdf-document-upload" /&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				&amp;lt;field id="pdf-document-upload" label-id="com.assystem.doclib.action.uploadPDF.form.field.pdf-document-upload"&amp;gt;
					&amp;lt;constraint-handlers&amp;gt;
						&amp;lt;constraint type="MANDATORY" validation-handler="Alfresco.forms.validation.mandatory" event="blur" /&amp;gt;
					&amp;lt;/constraint-handlers&amp;gt;
					&amp;lt;control template="/com/assystem/form/controls/uploadpdf.ftl" /&amp;gt;
				&amp;lt;/field&amp;gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;&lt;P&gt;uploadpdf.ftl&lt;BR /&gt;=========================================&lt;/P&gt;&lt;PRE&gt;&amp;lt;div class="form-field"&amp;gt;
	&amp;lt;label&amp;gt;Upload PDF:&amp;lt;/label&amp;gt;
	&amp;lt;input type="file" multiple="" name="prop_pdf-document-upload" /&amp;gt;
&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;UploadPDFExecuter.java&lt;BR /&gt;==========================================&lt;/P&gt;&lt;PRE&gt;public class UpdateLivrablePDFExecuter extends ActionExecuterAbstractBase {

public static final String PARAM_PDF_DOCUMENT_UPLOAD = "pdf-document-upload";

private ServiceRegistry serviceRegistry;


@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {

// Result of uploadFile : {uploadFile=C:\fakepath\pom.xml}
Serializable uploadFile = (Serializable) action.getParameterValue(PARAM_PDF_DOCUMENT_UPLOAD);&lt;/PRE&gt;&lt;P&gt;How can i have my document in uploadFile ? (instead of&amp;nbsp;uploadFile=C:\fakepath\pom.xml)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for yours answers !&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 07:25:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file-with-doclibaction/m-p/132098#M35635</guid>
      <dc:creator>David76</dc:creator>
      <dc:date>2021-06-01T07:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Upload File with DoclibAction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-file-with-doclibaction/m-p/132099#M35636</link>
      <description>&lt;P&gt;The Forms framework is not designed to handle file uploads at all - both on the client and the server-side. So there is no way to support this unless you use some custom dialog handling code on the client (which may still use the form definition to render the form UI) which calls a custom web script endpoint to accept the parameters, including the file upload, which also requires some custom submit handling code to properly transfer to that endpoint.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 10:16:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-file-with-doclibaction/m-p/132099#M35636</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-06-01T10:16:51Z</dc:date>
    </item>
  </channel>
</rss>

