<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged files</title>
<link>https://overflow.efficy.io/?qa=tag/files</link>
<description>Powered by Question2Answer</description>
<item>
<title>Access violation at address while using getFileStream</title>
<link>https://overflow.efficy.io/?qa=5431/access-violation-at-address-while-using-getfilestream</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I am trying to transform large files (&lt;code&gt;FILES.KIND = 5&lt;/code&gt;) to embedded one.&lt;br&gt;
And I am using the  getFileStream  as I need to assign a &lt;code&gt;FILES.STREAM&lt;/code&gt; field which is null in case of large file.&lt;br&gt;
While running Scheduler or DataSynchro I am getting more and less same error : &lt;code&gt;Access violation at address 000000000083531A in module&lt;/code&gt; on getFileStream step.&lt;br&gt;
I tried different versions (11.2, 11.3, etc.) but still getting the error. &lt;/p&gt;

&lt;p&gt;Here is a small example of the DataSynchro import script: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function EfficyImportRecord(DataStore) {
  var k_File = DataStore.AsString('K_FILE'),
      k_Docu = DataStore.AsString('K_1'),
editDocu = Efficy.openEditContext(ntDocu, k_Docu);
  Efficy.log('KFile: ' + k_File);
  stream = Efficy.getFileStream(editDocu, DataStore);
  Efficy.log('Stream: ' + stream);
  return true;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=1766080721507303177&quot; alt=&quot;datasynchro error&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=1564540188812631968&quot; alt=&quot;scheduler script errors&quot;&gt;&lt;br&gt;
Any ideas ?&lt;/p&gt;

&lt;p&gt;Maybe we have already some examples or scripts that are doing large file to embedded , let me know.&lt;/p&gt;

&lt;p&gt;Tnx.&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5431/access-violation-at-address-while-using-getfilestream</guid>
<pubDate>Wed, 13 May 2020 10:33:28 +0000</pubDate>
</item>
<item>
<title>How to make a pubic shared file readable by the browser</title>
<link>https://overflow.efficy.io/?qa=3879/how-to-make-a-pubic-shared-file-readable-by-the-browser</link>
<description>&lt;p&gt;Hello Team, &lt;/p&gt;

&lt;p&gt;I would like to extend a functionality of the file sharing.&lt;/p&gt;

&lt;p&gt;In the extranet of a customer, we have 4 images. In the CRM, those 4 images are a files (attachement of a document). &lt;/p&gt;

&lt;p&gt;Previously, when this files were committed, it created a new file on the server, as real image. This solution is not longer possible due to the new policies of the Cloud Team (it is not allowed anymore of write something in the server). Wich I can totally understand.&lt;/p&gt;

&lt;p&gt;After discussion with the cloud team, they advice me to create a public sharing link of the file. We store the link in the sys_storages.&lt;/p&gt;

&lt;p&gt;This part work greate. We can update the image, then a new public link is generated. &lt;/p&gt;

&lt;p&gt;But as result, the image is not showed. &lt;/p&gt;

&lt;p&gt;We can see in the HTML : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;img scr=&quot;https://files.efficy.com/file/download?p=6S4WVsBrGRC1NcW3D8acrlt%2FIxTP8ngRojoViM6nVkoJRyCRHRokoAgpzdJ9kJqGlmiKOYu9a1UJ3LkMi6NtliTwYxkoloPyoluUHT%2BxAFcOo%2FuIoqfPNpeK4wRLyWvoYIU%2FJ6put98H5kzKCkITkg%3D%3D&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is the correct link. But the browser don't try to show the image. If you click on the link, it download the image. &lt;/p&gt;

&lt;p&gt;What is strange : I used the same &quot;hack&quot; to send an email with an image. This work perfectly.&lt;/p&gt;

&lt;p&gt;Can't we make the image showed ? If this work, the possibilities of customisation would be really amazing :) &lt;/p&gt;

&lt;p&gt;Thanks in advance for your help, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3879/how-to-make-a-pubic-shared-file-readable-by-the-browser</guid>
<pubDate>Thu, 24 Jan 2019 07:23:15 +0000</pubDate>
</item>
<item>
<title>Gallery thumbnail issue due to dimensions</title>
<link>https://overflow.efficy.io/?qa=3716/gallery-thumbnail-issue-due-to-dimensions</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;We recently had an upgrade to efficy 11.1. &lt;/p&gt;

&lt;p&gt;When uploading attachments to a document, everything goes fine.&lt;/p&gt;

&lt;p&gt;However, the gallery thumbnails don't work for images added after the upgrade to efficy. When i look into the FILES table, i see that the dimensions are wrong ( always pxwidth = 9519688, pxheight = 0 ) &lt;br&gt;
I presume that the thumbnail dimensions are then badly calculated.&lt;/p&gt;

&lt;p&gt;Is this a known issue? Where should i look to fix this?&lt;/p&gt;

&lt;p&gt;Efficy version : Efficy (Build 11.1.14457.0 2018-09-11 11:01)&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3716/gallery-thumbnail-issue-due-to-dimensions</guid>
<pubDate>Thu, 06 Dec 2018 16:54:02 +0000</pubDate>
</item>
<item>
<title>how to get a file from Soap Request</title>
<link>https://overflow.efficy.io/?qa=3133/how-to-get-a-file-from-soap-request</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;i need to get a pdf file from a soap call to an external webservices.&lt;/p&gt;

&lt;p&gt;When i try to do it with soap ui,  i get a response like that :&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=12017686003718410389&quot; alt=&quot;screenshot from soapui&quot;&gt;&lt;/p&gt;

&lt;p&gt;When i click on the attachement, i can save it in .pdf, and i have a readable file.&lt;/p&gt;

&lt;p&gt;But,  i don't really know how i can do it in serverscript.&lt;/p&gt;

&lt;p&gt;i get a raw response like that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=11489886934131395534&quot; alt=&quot;raw response&quot;&gt;&lt;/p&gt;

&lt;p&gt;Somebody have an idea on how to get this stream corectly from the soap response and put it in a pdf file ?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3133/how-to-get-a-file-from-soap-request</guid>
<pubDate>Tue, 08 May 2018 09:23:51 +0000</pubDate>
</item>
<item>
<title>Insert Remote file to new document through SOAP</title>
<link>https://overflow.efficy.io/?qa=2998/insert-remote-file-to-new-document-through-soap</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I have a client who would like to use Efficy standard SOAP API to insert voice recording files with link to contact. The client is using Remote files to store the attachments (not stored in Efficy's DB as BLOB).&lt;/p&gt;

&lt;p&gt;Does any one have an XML sample that needs to be used for this request please? and is there some documentation for FILES.KIND field? what are the possible values, i see in DB values 1 and 4, i suppose 1 for localy stored on DB and 4 for remote. right? but i searched for some documents that explain the possibilities of these values, but i couldn't find any.&lt;/p&gt;

&lt;p&gt;Thank you for your help in advance.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2998/insert-remote-file-to-new-document-through-soap</guid>
<pubDate>Fri, 23 Mar 2018 11:16:24 +0000</pubDate>
</item>
<item>
<title>Force update attachement count in documents</title>
<link>https://overflow.efficy.io/?qa=2760/force-update-attachement-count-in-documents</link>
<description>&lt;p&gt;I updated a big group of files in admin.files, changing the K_1 field linking to another document. When checking the result in Efficy and opening the document itself I see that the files nicely moved from one document to the other. But when checking a project, I saw that the count of files per document is not updated. For example, a document which should not contain any files anymore, but the counter still mentions 5 files. Only when temporarily adding another file and saving it, the counter is updated. &lt;br&gt;
How can I force to update the counter?&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=10976838606030527174&quot; alt=&quot;File counter&quot;&gt;&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2760/force-update-attachement-count-in-documents</guid>
<pubDate>Wed, 22 Nov 2017 19:43:48 +0000</pubDate>
</item>
<item>
<title>Modifying Thumbnail size</title>
<link>https://overflow.efficy.io/?qa=1465/modifying-thumbnail-size</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;how are the thumbnails generated withing efficy?&lt;br&gt;
Is there a chance to modify the size of the thumbnails?&lt;/p&gt;

&lt;p&gt;We would like to return the thumnails in a certain size.&lt;/p&gt;

&lt;p&gt;As an option we could recreate them via (scheduled) workflow...&lt;/p&gt;

&lt;p&gt;Any chance to do that?&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;Tim&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1465/modifying-thumbnail-size</guid>
<pubDate>Wed, 30 Mar 2016 09:01:29 +0000</pubDate>
</item>
<item>
<title>How use File into the Efficy main Helpdesk page liste.</title>
<link>https://overflow.efficy.io/?qa=1375/how-use-file-into-the-efficy-main-helpdesk-page-liste</link>
<description>&lt;p&gt;Hello I need to create a custom view for Helpdesk Main page.&lt;br&gt;
I Added File into my view. Then I created a special TD grid definition into the gridColumnCustom&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;td.FILE.Case {[&amp;lt;%OnArgument(Argvalue=&quot;&amp;lt;#F=$FIELD$&amp;gt;&quot;, Value=&quot;0&quot;, then=|&amp;lt;td class=&quot;icon-cell&quot;&amp;gt;|,
  else=|&amp;lt;td class=&quot;icon-cell i-attach pointer&quot; data-dropdown=&quot;dd-files&quot; data-options=&quot;align:left&quot;
          data-dropdown-ajax=&quot;consult?page=dropdown/FilesCase.htm&amp;amp;count=-1&amp;amp;filter=false&amp;amp;detail=File&amp;amp;sort=K_SORT&amp;amp;entity=$ENTITY$&amp;amp;key=&amp;lt;#F=$KEY$&amp;gt;&quot;&amp;gt;&amp;lt;#F=$FIELD$&amp;gt;|)%&amp;gt;&amp;lt;/td&amp;gt;]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then I Created the specific page FilesCases.htm based on the Files.htm page.&lt;br&gt;
The difference is that I defined a specific RunQuery.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%LoadMacros('MacroDialog')%&amp;gt;
    &amp;lt;%Delay(1)%&amp;gt;RunQuery(id=&quot;GetPJ&quot;, SQL=&quot;SELECT * FROM &amp;lt;#TABLE NAME=DOCU_CASE&amp;gt; DOCU_CASE INNER JOIN &amp;lt;#TABLE NAME=DOCUMENTS&amp;gt; DOCUMENTS ON DOCUMENTS.K_DOCUMENT=DOCU_CASE.K_DOCUMENT LEFT OUTER JOIN &amp;lt;#TABLE NAME=FILES&amp;gt; FILES ON FILES.K_1 = DOCUMENTS.K_DOCUMENT WHERE K_CASE =:param1 &quot;, param1=&quot;%%GetArgument('key')&quot;)%&amp;gt;
    &amp;lt;%Delay(1)%&amp;gt;GetDataGrid(query=&quot;GetPJ&quot;, noheader=&quot;true&quot;, norecords=&quot;Aucune fiche&quot;, Count=-1, TemplateText=|
    &amp;lt;#repeat&amp;gt;
        &amp;lt;li&amp;gt;
            &amp;lt;div class=&quot;file-info&quot; id=&quot;file-&amp;lt;#F=K_FILE&amp;gt;_&amp;lt;#F=VERSION&amp;gt;&quot;
                data-file-url=&quot;&amp;lt;%GetFileURL('&amp;lt;#F=K_FILE&amp;gt;_&amp;lt;#F=VERSION&amp;gt;', full=T)%&amp;gt;&quot;
                data-file-kind=&quot;&amp;lt;#F=Kind&amp;gt;&quot;
                data-file-id=&quot;&amp;lt;#F=K_FILE&amp;gt;_&amp;lt;#F=VERSION&amp;gt;&quot;
                data-file-path=&quot;&amp;lt;#F=Path; jstext=T; nospace=T&amp;gt;&quot;
                data-file-comment=&quot;&amp;lt;#F=Comment; jstext=T; nospace=T&amp;gt;&quot;
                data-msg=&quot;open;$this&quot; data-channel=&quot;files&quot;&amp;gt;
                &amp;lt;div class=&quot;main&quot;&amp;gt;
                    &amp;lt;span class=&quot;type float-start&quot;&amp;gt;&amp;lt;i class=&quot;file-type-&amp;lt;%GetAttachmentName('&amp;lt;#F=PATH&amp;gt;', ext=T, lowercase=T)%&amp;gt;&quot;&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;
                    &amp;lt;span class=&quot;path&quot;&amp;gt;&amp;lt;%GetAttachmentName(&quot;&amp;lt;#F=PATH; jstext=T; nospace=T&amp;gt;&quot;, comment=&quot;&amp;lt;#F=COMMENT; jstext=T; nospace=T&amp;gt;&quot;)%&amp;gt;&amp;lt;/span&amp;gt;
                    &amp;lt;span class=&quot;filesize&quot;&amp;gt;&amp;lt;#F=FileSize; filesize=T&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div class=&quot;details&quot;&amp;gt;
                    &amp;lt;span class=&quot;version&quot;&amp;gt;&amp;lt;%GetLabel('Revision')%&amp;gt;&amp;lt;#F=VERSION&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;modified&quot;&amp;gt;&amp;lt;#F=D_CHANGE&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;/#repeat&amp;gt;
    |)%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A least the file lightbox with my file is there and the url  is similar with the classical file lightbox.&lt;/p&gt;

&lt;p&gt;Here the generated code&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&quot;file-info&quot; id=&quot;file-50846_0&quot; data-file-url=&quot;http://127.0.0.1/efficy.dll/download?KEY=50846_0&amp;amp;amp;CONSULTHANDLE=41&quot; data-file-kind=&quot;1&quot; data-file-id=&quot;50846_0&quot; data-file-path=&quot;DEV_Product_Import_1stRun.txt&quot; data-file-comment=&quot;DEV_Product_Import_1stRun&quot; data-msg=&quot;open;$this&quot; data-channel=&quot;files&quot;&amp;gt;
            &amp;lt;div class=&quot;main&quot;&amp;gt;
                &amp;lt;span class=&quot;type float-start&quot;&amp;gt;&amp;lt;i class=&quot;file-type-txt&quot;&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;span class=&quot;path&quot;&amp;gt;DEV_Product_Import_1stRun.txt&amp;lt;/span&amp;gt;
                &amp;lt;span class=&quot;filesize&quot;&amp;gt;30 kB&amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div class=&quot;details&quot;&amp;gt;
                &amp;lt;span class=&quot;version&quot;&amp;gt;Rév.0&amp;lt;/span&amp;gt; &amp;lt;span class=&quot;modified&quot;&amp;gt;23/02/16 16:04&amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But the url return a Message: Field 'K_FILE' not found&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;http://127.0.0.1/efficy.dll/download?KEY=50846_0&amp;amp;CONSULTHANDLE=41&quot;&gt;http://127.0.0.1/efficy.dll/download?KEY=50846_0&amp;amp;CONSULTHANDLE=41&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think that the problem is due to the context the consulthandle because this same url from an other consulthandle is working.&lt;/p&gt;

&lt;p&gt;Any solution to bypass this restriction ? Or maybe it's not the good way to do what i need to do.  &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1375/how-use-file-into-the-efficy-main-helpdesk-page-liste</guid>
<pubDate>Thu, 25 Feb 2016 15:56:21 +0000</pubDate>
</item>
</channel>
</rss>