<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged file-upload</title>
<link>https://overflow.efficy.io/?qa=tag/file-upload</link>
<description>Powered by Question2Answer</description>
<item>
<title>Send file with AJAX and method POST from a new page with a connected user</title>
<link>https://overflow.efficy.io/?qa=6540/send-file-with-ajax-method-post-from-page-with-connected-user</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I try to create a new page for a connect user. but I don't know why, I can't send an ajax request with a file parameter.&lt;/p&gt;

&lt;p&gt;when I test my code without select a file in my html form and submit, all is good, a log file is created and this console log message : &quot;value : undefined&quot; appear (it's undefined cause I don't give a file)&lt;/p&gt;

&lt;p&gt;But when I select a file, I haven't file log created and an empty message in the console.&lt;/p&gt;

&lt;p&gt;I don't understand why I couldn't send a file from ajax ?  &lt;/p&gt;

&lt;p&gt;here my html code : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%LoadMacros(&quot;MacroDesktop&quot;)%&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;%UseScript('js/config/require.config.js', fixedpath=T, data-custombase='%%GetCustomBase()', data-dealerbase='%%GetDealerBase()')%&amp;gt;
    &amp;lt;%Macro('RequireConfigDealer', evaluate=T)%&amp;gt;
    &amp;lt;%Macro('RequireConfigCustom', evaluate=T)%&amp;gt;
    &amp;lt;%UseScript('../lib/js/vendor/require.js', fixedpath=T)%&amp;gt;
    &amp;lt;%UseScript(&quot;scripts/Base&quot;, fixedline=T)%&amp;gt;
    &amp;lt;%UseScript(&quot;custom/Custom&quot;, fixedline=T, ifexists=T)%&amp;gt;
    &amp;lt;script&amp;gt;
        function Loaded() {
            requirejs(['jquery'], function ($) {
                $('#upload').click(function () {
                    var url = 'dialog?_macrofile=MacroAjax&amp;amp;_macro=RunScript&amp;amp;file=test&amp;amp;func=myTest';
                    var element = document.getElementById(&quot;fileupload&quot;);
                    var myfiles = element.files;
                    var data = new FormData();
                    var i = 0;
                    for (i = 0; i &amp;lt; myfiles.length; i++) {
                        data.append('file' + i, myfiles[i]);
                    }

                    $.ajax({
                        url: url,
                        type: 'POST',
                        contentType: false,
                        data: data,
                        processData: false,
                        cache: false
                    }).done(function (msg) {
                        console.log(msg);
                        if (msg.match(&quot;class=\&quot;efficy-error\&quot;&quot;)) {
                            $('body').html(msg);
                        } else {
                            $('form').append(&quot;OK&quot;);
                        }
                    });
                });
            });
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&quot;Loaded()&quot;&amp;gt;
&amp;lt;form enctype=&quot;multipart/form-data&quot;&amp;gt;
    &amp;lt;input type=&quot;file&quot; name=&quot;fileupload&quot; id=&quot;fileupload&quot; /&amp;gt;&amp;lt;br&amp;gt;

    &amp;lt;button type=&quot;button&quot; id=&quot;upload&quot;&amp;gt;Upload&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and here my serverscript file : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/*
@import ReaderPOST from serverjs/ReaderPOST
*/

function myTest()
{
    strSaveTextFile(&quot;C:\\path\\myTest.txt&quot;, &quot;&quot;, false);
    var value = &quot;\ntest : &quot; + Request.argument('myArg') + &quot;\n&quot;;

    value += &quot;utf8Content :\n&quot; + Request.utf8Content + &quot;\n&quot;;

    ReaderPOST.init(Request.utf8Content);

    strSaveTextFile(&quot;C:\\EfficyWebServer\\myTest.txt&quot;, value, true);
    return &quot;value : &quot; + ReaderPOST.getValue(&quot;file0&quot;);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Someone have an idea why my script isn't even executed (no file log =&amp;gt; function isn't exectued)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I went a little further, and realized that what was causing the problem was the formData. When he is empty (no file selected) the function wanted is called but when he is not, I don't know what happen in the black box but my function isn't called.&lt;br&gt;
Someone know why ? It is an Efficy bug or intentionnal behavior ?&lt;/p&gt;

&lt;p&gt;Really thanks in advance for your help ! &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6540/send-file-with-ajax-method-post-from-page-with-connected-user</guid>
<pubDate>Fri, 13 May 2022 14:11:30 +0000</pubDate>
</item>
<item>
<title>Customizing the &quot;File import&quot; (and the communication with the sidebarre ?)</title>
<link>https://overflow.efficy.io/?qa=4846/customizing-the-file-import-communication-with-sidebarre</link>
<description>&lt;p&gt;Hello Efficy Team, &lt;/p&gt;

&lt;p&gt;One of my customer asked me a very good question.&lt;br&gt;
Could it be possible to customize the &quot;Import file&quot; function you can find in the projects ?&lt;/p&gt;

&lt;p&gt;What they want is simple : if we select a folder, all files of that folder are added directly in the current project, instead of in a new project, liked to the current project. I couldn't agree more, this makes more sens.&lt;/p&gt;

&lt;p&gt;I followed the code in standard, and my conclusion is :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;treeImport.js&lt;/code&gt; call &amp;gt; &lt;code&gt;fileHelperCmd.js&lt;/code&gt; call &amp;gt; &lt;code&gt;fileHelper.js&lt;/code&gt; call &amp;gt; &lt;code&gt;sidebar.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The browser send &lt;code&gt;TREE_IMPORT_PROCESS&lt;/code&gt; to the sidebar, but we cannot pass any argument. I supposed that it is hard coded : when a folder is selected, a new project is created.&lt;/p&gt;

&lt;p&gt;I would like to avoid making a custom for that. Even if I could get all files from the selected folder and upload them one by one, asynchronously.&lt;/p&gt;

&lt;p&gt;Anyway, i did't (yet) reply &quot;yes&quot; to the customer :) I don't think it will be possible, at least not in 11.3.&lt;/p&gt;

&lt;p&gt;Did anyone already faced something like that ? &lt;/p&gt;

&lt;p&gt;Regards, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4846/customizing-the-file-import-communication-with-sidebarre</guid>
<pubDate>Thu, 03 Oct 2019 08:31:53 +0000</pubDate>
</item>
<item>
<title>Error on opening DOCX and XLSX files</title>
<link>https://overflow.efficy.io/?qa=3696/error-on-opening-docx-and-xlsx-files</link>
<description>&lt;p&gt;We recently upgraded an on premise customer to Efficy 11.1&lt;br&gt;
After the upgrade the customer has a problem with opening DOCX files from Efficy documents.&lt;br&gt;
Directly after opening the &quot;connection&quot; between the Efficy-document and the file is lost: When the user saves the file, an error pops up: &quot;There was an error uploading the file, do you want to try again ?&quot;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is special:&lt;/strong&gt;&lt;br&gt;
This problem only occurs on DOCX and XLSX files. DOC files and XLS files and any other types of files (rtf, txt) works fine.&lt;br&gt;
The problem only occurs on devices of the customer. I cannot reproduce the problem on my own machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customer Environment&lt;/strong&gt;&lt;br&gt;
Efficy v11.1.13&lt;br&gt;
The customer works on Office 365 &lt;strong&gt;ProPlus&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3696/error-on-opening-docx-and-xlsx-files</guid>
<pubDate>Mon, 03 Dec 2018 09:37:06 +0000</pubDate>
</item>
<item>
<title>How to update the contact profile picture using soap?</title>
<link>https://overflow.efficy.io/?qa=2515/how-to-update-the-contact-profile-picture-using-soap</link>
<description>&lt;p&gt;I've got a question about the Efficy Soap Wrapper for .Net. The profile picture of a user has to be updated using the efficy soap wrapper. What is the best way to do this?&lt;/p&gt;

&lt;p&gt;Besides that I would like to know how I can retrieve the file format (jpg/png/etc.). Is this information being saved in the database or do we need to retrieve this from the header in the binary data?&lt;/p&gt;
</description>
<category>Efficy Partners</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2515/how-to-update-the-contact-profile-picture-using-soap</guid>
<pubDate>Wed, 31 May 2017 15:20:38 +0000</pubDate>
</item>
<item>
<title>import Contact Picture using Efficy's webservice</title>
<link>https://overflow.efficy.io/?qa=1825/import-contact-picture-using-efficys-webservice</link>
<description>&lt;p&gt;Hi Everyone, &lt;/p&gt;

&lt;p&gt;I'm working on an .Net application in which I have to import contacts from an ID card reader (BeId) to Efficy and I'm stuck at importing contact's picture.&lt;/p&gt;

&lt;p&gt;Is there a specific way of importing contact picture? &lt;br&gt;
Is there a specific format to use? &lt;/p&gt;

&lt;p&gt;Thanks in advance for your answers! &lt;/p&gt;

&lt;p&gt;KR, &lt;/p&gt;

&lt;p&gt;Prince&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1825/import-contact-picture-using-efficys-webservice</guid>
<pubDate>Wed, 17 Aug 2016 10:51:00 +0000</pubDate>
</item>
<item>
<title>Export Efficy document to Guest pages</title>
<link>https://overflow.efficy.io/?qa=198/export-efficy-document-to-guest-pages</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;A customer would like export document (.pdf) from Efficy to an Efficy guest page.&lt;br&gt;
This guest page is only available for specific contacts...&lt;br&gt;
Eg. : Meetings Minutes uploaded on an specific guest page and available for specific contacts?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can we handle specific guest page for specific contact (group in a profile)&lt;/li&gt;
&lt;li&gt;Is it possible to export documents to a guest pages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thx&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=198/export-efficy-document-to-guest-pages</guid>
<pubDate>Thu, 12 Feb 2015 14:08:09 +0000</pubDate>
</item>
<item>
<title>Upload Document to Efficy from Guest ( in 2014 )</title>
<link>https://overflow.efficy.io/?qa=175/upload-document-to-efficy-from-guest-in-2014</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I need to make a guest page that can create a contacte and upload a Curriculum Vitae to Efficy, allong with values for some other custom fields.&lt;/p&gt;

&lt;p&gt;I've found the FileUploader and the UploadCv ( used @ Senses ) in the SVN, but what's the best way to do it ? &lt;strong&gt;or is there another way to do this in Efficy 2014 ??&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the UploadCv is the best way to go ? How do I change this ? I see there is a .dll file explicitly for this app, but how do we create this? I have no experience what so ever with Visual Studio, but I can always learn :-)&lt;/p&gt;

&lt;p&gt;Kind Regards,&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=175/upload-document-to-efficy-from-guest-in-2014</guid>
<pubDate>Wed, 28 Jan 2015 08:01:01 +0000</pubDate>
</item>
</channel>
</rss>