<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Ivy.wf().documents() - How to change root destination path of uploaded files</title><link>https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files</link><description>&lt;p&gt;I use &lt;code&gt;Ivy.wf().documents()&lt;/code&gt; and want to upload files to my own folder ("c:/documents/attachments/ID"). 
But I got an error as it always upload to a default roor folder "C:\00.FIXIT_Designer7.0.14\files\application\" and just allows add subs folder inside:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Ivy.wf().documents()
            .add(new ch.ivyteam.ivy.workflow.document.Path("c:/documents/attachments/ID"))
            .write()
            .withContentFrom(file);

IOException: Unable to create directory C:\00.FIXIT_Designer7.0.14\files\application\c:\documents\attachments\ID
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(double "c:\")&lt;/p&gt;
&lt;p&gt;Is there any way to change it?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 11 May 2020 21:46:09 -0400</lastBuildDate><item><title>Comment by nvtan on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files#4562</link><description>&lt;p&gt;Oh that's good for me to know. Thank you &lt;a href="https://answers.axonivy.com/users/17/reguel-wermelinger"&gt;&lt;a href="https://answers.axonivy.com/users/17/reguel-wermelinger"&gt;@Reguel&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nvtan</dc:creator><pubDate>Mon, 11 May 2020 21:46:09 -0400</pubDate><guid>https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files#4562</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files/4561</link><description>&lt;p&gt;The document APIs live on the workflow context. Therefore all files are stored relative to the workflow application they belong to. &lt;/p&gt;
&lt;p&gt;Documents are valuable artifacts of workflow process. They must be included in backups and so forth as a consequence workflow administrators must known where these documents live. 
.... so, if the API would allow to store files just anywhere on a drive, this would be a miss-conception. &lt;/p&gt;
&lt;p&gt;What you can do since 8.0 is to change the root directory of all files that belong to an application:
&lt;a href="https://dev.axonivy.com/doc/8.0/engine-guide/configuration/files/app-yaml.html"&gt;https://dev.axonivy.com/doc/8.0/engine-guide/configuration/files/app-yaml.html&lt;/a&gt;
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/Selection_827.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 11 May 2020 04:09:36 -0400</pubDate><guid>https://answers.axonivy.com/questions/4560/ivy-wf-documents-how-to-change-root-destination-path-of-uploaded-files/4561</guid></item></channel></rss>