<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Conversion task not triggered after REST upload</title><link>https://www.aras.com/community/f/development/3961/conversion-task-not-triggered-after-rest-upload</link><description>I am uploading files using the REST API. However, after a successful upload, the conversion task that is associated with the specified file type is not being triggered. If I upload the same file using the client, the task is triggered. Has anyone done</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Conversion task not triggered after REST upload</title><link>https://www.aras.com/community/thread/2131?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 08:04:22 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:48f7da29-8caa-4033-9c7d-af944676db6a</guid><dc:creator>mmoales</dc:creator><description>Hi Chris,

The following are the request bodies I have used when invoking the vault.CommitTransaction method. Both succeed in creating the file in the vault, but neither triggers the conversion task. The first request associates the newly uploaded file with a Document. The second simply creates the File in the vault.

&lt;code&gt;
# JSON data for vault.CommitTransaction request body
# Creates Document with Document File pointing to uploaded file
data = {
&amp;#39;@odata.context&amp;#39;: host + &amp;#39;/Server/odata/$metadata#Document/$entity&amp;#39;,
&amp;#39;@odata.type&amp;#39;: &amp;#39;#Document&amp;#39;,
&amp;#39;id&amp;#39;: docId,
&amp;#39;item_number&amp;#39;: &amp;#39;DOC-02&amp;#39;,
&amp;#39;Document File&amp;#39;: [{
'id': docFileId,
'related_id': {
'id': fileId,
'filename': filename
}
}]
}&lt;/code&gt;

&lt;code&gt;
# JSON data for vault.CommitTransaction request body
# Creates a File in the vault
info = { &amp;#39;file_version&amp;#39;: &amp;#39;1&amp;#39;, &amp;#39;related_id&amp;#39;: VAULT_ID }
located = [info]
data = {
&amp;#39;@odata.context&amp;#39;: host + &amp;#39;/Server/odata/$metadata#File/$entity&amp;#39;,
&amp;#39;@odata.type&amp;#39;: &amp;#39;#File&amp;#39;,
&amp;#39;id&amp;#39;: fileId,
&amp;#39;filename&amp;#39;: filename,
&amp;#39;file_size&amp;#39;: str(size),
&amp;#39;Located&amp;#39;: located
}
&lt;/code&gt;

If I upload the same file using &amp;quot;Administration &amp;gt; File Handling &amp;gt; Files &amp;gt; New File...&amp;quot;, the conversion task is triggered.

Thanks,

Mark

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conversion task not triggered after REST upload</title><link>https://www.aras.com/community/thread/2130?ContentTypeID=1</link><pubDate>Tue, 09 Oct 2018 16:49:09 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0f4d7f33-9c5f-430a-b5b4-3b8ea058232b</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Mark,

Could you share the REST call that you&amp;#39;re using to create the File? From my experience, it hasn&amp;#39;t been possible to upload a file directly through AML outside of a Server Method or the Batchloader.

You can try creating a Server Method that creates a File within it, and then use the REST API to call that Server Method. You can find an example of the REST call to do this below.

&lt;strong&gt;url:&lt;/strong&gt; localhost/.../method.CreateFile

&lt;strong&gt;body: &lt;/strong&gt;{
&amp;quot;@odata.type&amp;quot;: &amp;quot;&amp;quot;&amp;gt;localhost/.../$metadata,
&amp;quot;file_path&amp;quot;: &amp;quot;C:\\Temp\\&lt;strong&gt;MY_FILE_NAME.MY_FILE_EXTENSION&lt;/strong&gt;&amp;quot;
}

Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>