<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Temporary file got override</title><link>https://answers.axonivy.com/questions/4183/temporary-file-got-override</link><description>&lt;p&gt;Hi Fold,&lt;/p&gt;
&lt;p&gt;I got an issue with &lt;code&gt;ch.ivyteam.ivy.scripting.objects.File&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When our Ivy application receive a file via SOAP with the same name all the time Ex: Information.html&lt;/p&gt;
&lt;p&gt;We create a temporary file &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ch.ivyteam.ivy.scripting.objects.File file = new ch.ivyteam.ivy.scripting.objects.File(path,true)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem happens is when 2 requests come at the same time, the second temporary file overrode the first one.&lt;/p&gt;
&lt;p&gt;Is there any way to avoid it without change file name? or add subfolder (caseId) like IDocumentService in temporary file?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4183/temporary-file-got-override" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 25 Nov 2019 02:59:58 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/4183/temporary-file-got-override/4188</link><description>&lt;p&gt;The  &lt;code&gt;path&lt;/code&gt; parameter is relative. So you can easily include more dynamic parts such as a folder:&lt;/p&gt;
&lt;p&gt;e.g. &lt;code&gt;new File(ch.ivyteam.util.GuidUtil.generateID()/fileName, true)&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 25 Nov 2019 02:59:58 -0500</pubDate><guid>https://answers.axonivy.com/questions/4183/temporary-file-got-override/4188</guid></item></channel></rss>