<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic using dropzone.js in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081208#M61700</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;In my app, I'm using &amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.dropzonejs.com/" style="font-size: 1em;"&gt;http://www.dropzonejs.com/&lt;/A&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;to choose a file from the phone's gallery and upload it.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;It works perfectly in the app simulator and in the Intel App Preview app on my phone.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;BUT, when I build the APK and install it, and try to upload a picture, I get:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;"All apps associated with this action have been turned off, blocked, or are not installed".&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Do I need to do something else to make it work?&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 23:27:27 GMT</pubDate>
    <dc:creator>Shawn_A_</dc:creator>
    <dc:date>2017-01-27T23:27:27Z</dc:date>
    <item>
      <title>using dropzone.js</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081208#M61700</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;In my app, I'm using &amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.dropzonejs.com/" style="font-size: 1em;"&gt;http://www.dropzonejs.com/&lt;/A&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;to choose a file from the phone's gallery and upload it.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;It works perfectly in the app simulator and in the Intel App Preview app on my phone.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;BUT, when I build the APK and install it, and try to upload a picture, I get:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;"All apps associated with this action have been turned off, blocked, or are not installed".&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Do I need to do something else to make it work?&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 23:27:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081208#M61700</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-01-27T23:27:27Z</dc:date>
    </item>
    <item>
      <title>Does your phone grants the</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081209#M61701</link>
      <description>&lt;P&gt;Does your phone grants the permission to access the local storage?&lt;/P&gt;

&lt;P&gt;Do you have installed any encryption apps on your phone that protects the files from being accessed without a password? &amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2017 07:39:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081209#M61701</guid>
      <dc:creator>Alex_Hang</dc:creator>
      <dc:date>2017-01-28T07:39:00Z</dc:date>
    </item>
    <item>
      <title>I'm assuming somewhere in the</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081210#M61702</link>
      <description>&lt;P&gt;I'm assuming somewhere in the app I need to specify or ask for permission to the camera or photo gallery of the device.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I don't know how to do that.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN style="font-size: 12px;"&gt;Does your phone grants the permission to access the local storage?&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;When the APK is installed, it doesn't ask for any permissions.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN style="font-size: 12px;"&gt;Do you have installed any encryption apps on your phone that protects the files from being accessed without a password? &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12px;"&gt;No&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2017 15:16:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081210#M61702</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-01-28T15:16:47Z</dc:date>
    </item>
    <item>
      <title>To ask for a permission you</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081211#M61703</link>
      <description>&lt;P&gt;To ask for a permission you need to edit the Android Manifest file, but this is not required when you build Cordova apps, because they use plugins for accessing device native resources.&lt;/P&gt;

&lt;P&gt;You probably need a plugin for accessing the local storage( I think it's a core plugin), of find a specific third-party plugin from DropzoneJS, If it exists.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2017 19:34:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081211#M61703</guid>
      <dc:creator>Alex_Hang</dc:creator>
      <dc:date>2017-01-28T19:34:00Z</dc:date>
    </item>
    <item>
      <title>So far, I haven't used</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081212#M61704</link>
      <description>&lt;P&gt;So far, I haven't used Cordova at all, or included it in my plain HTML app.&lt;/P&gt;

&lt;P&gt;I was hoping to not have to do that.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is using cordova the only practical way?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I don't know which file is my android manifest file. There isn't one with "manifest" in the name that I can see in my app folder.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 17:07:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081212#M61704</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-01-30T17:07:49Z</dc:date>
    </item>
    <item>
      <title>Shawn -- in most cases you</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081213#M61705</link>
      <description>&lt;P&gt;Shawn -- in most cases you won't be able to access local resources without using plugins. The photos taken by the camera are managed by the device and the OEM; in general, those pictures are available to other apps to view, but they cannot rename, move or otherwise modify them without permission. That is why you'll see most apps have to make a copy and then save that copy in an app-specific location on the device. By default, your app does not have access to the full file-system on the device, only to that space which belongs to your app and, if it is available, to some external storage.&lt;/P&gt;

&lt;P&gt;You will need to convert your app into an "HTML5+Cordova" app type (you can "upgrade" the project on the Projects tab), and you'll likely need to use the "file" and "file-transfer" plugins. Follow the links to the plugin documentation for details on how to use the APIs those plugins provide.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 20:22:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081213#M61705</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2017-01-30T20:22:33Z</dc:date>
    </item>
    <item>
      <title>Thanks Paul, that makes sense</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081214#M61706</link>
      <description>&lt;P&gt;Thanks Paul, that makes sense. I have successfully upgrade to '&lt;SPAN style="font-size: 12px;"&gt;HTML5+Cordova".&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Now I will pursue the file plug in.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 20:40:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081214#M61706</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-01-30T20:40:27Z</dc:date>
    </item>
    <item>
      <title>I've converted to Cordova,</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081215#M61707</link>
      <description>&lt;P&gt;I've converted to Cordova, and have implemented navigator.camera function.&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;    // choose picture
    $(document).on(bindings,"#addPictures",function(event){               
        navigator.camera.getPicture(onGetPicSuccess, onGetPicFail, { 
            quality: 50,
            destinationType: destinationType.FILE_URI,
            sourceType: pictureSource.PHOTOLIBRARY 
        });
    });  &lt;/PRE&gt;

&lt;P&gt;When the user taps the #addPictures DIV, they are prompted to choose a picture.&lt;/P&gt;

&lt;P&gt;What I want to do is upload that picture to a remote server.&lt;/P&gt;

&lt;P&gt;I also need to add 2 name/value pairs to the string.&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;// success in getting picture from camera
function onGetPicSuccess(imageData){        
    var theSrc = "data:image/jpeg;base64," + imageData;
    
    console.log(theSrc);
    
    // upload pic

    var tkn=getToken();
    var ticketNo=$("#ticketList").val();
    var dataString=theSrc+"&amp;amp;dzToken="+tkn+"&amp;amp;dzTicket="+ticketNo;

    console.log(dataString);
    
     spinner(1);    

     $.ajax({    
            url: "https://myDomain.com/cgi/mFileUpload.exe",    
            dataType: "json",		
            data: dataString,
            error: ajaxError, 	
            success: function(json){   	 	
                
                if(json.error !== "0"){
                    spinner(0);
                    alertify.alert("ERROR "+json.error);
                    return;
                }	
                
                $("#picTA").show();
                reloadImages();                     
    
                spinner(0);
                
            }
     });        

}&lt;/PRE&gt;

&lt;P&gt;The problem is that the data I'm sending to the server is not what I'm expecting. I want HTML FORM type data, like you'd get if uploading a file from an HTML form with extra inputs.&lt;/P&gt;

&lt;P&gt;How do I get the data, specifically the picture data, into a HTML FORM format?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 19:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081215#M61707</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-02-01T19:31:00Z</dc:date>
    </item>
    <item>
      <title>This might help &gt; https:/</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081216#M61708</link>
      <description>&lt;P&gt;This might help &amp;gt; &lt;A href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Sending_forms_through_JavaScript#Dealing_with_binary_data" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Sending_forms_through_JavaScript#Dealing_with_binary_data&lt;/A&gt; &amp;lt; you'll have to get a copy of the picture file that you can operate on locally within your app. And note that the article is written with the assumption that you are running in a browser -- you are NOT running in a browser, you are running in a "webview" which has no host and has no domain, it is an independent stand-along web app.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 20:02:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081216#M61708</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2017-02-01T20:02:44Z</dc:date>
    </item>
    <item>
      <title>I think that is very close to</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081217#M61709</link>
      <description>&lt;P&gt;I think that is very close to what I need, but I have some confusion.&lt;/P&gt;

&lt;P&gt;When I successfully choose a file, the string (object?) &lt;EM&gt;imageData &lt;/EM&gt;gets returned.&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;        navigator.camera.getPicture(onGetPicSuccess, onGetPicFail, { 
            quality: 50,
            destinationType: destinationType.FILE_URI,
            sourceType: pictureSource.PHOTOLIBRARY 
        });&lt;/PRE&gt;

&lt;P&gt;to this function&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;// success in getting picture from camera
function onGetPicSuccess(imageData){        
    // imageData looks like   blob:http%3A//localhost%3A57492/ac65226c-5698-4345-b301-81205b1403fa 
    
    var theSrc = "data:image/jpeg;base64," + imageData;
    
... more stuff here&lt;/PRE&gt;

&lt;P&gt;It looks like &lt;EM&gt;imageData &lt;/EM&gt;is a local link to the image file? If so how do I grab that entire file?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 21:52:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081217#M61709</guid>
      <dc:creator>Shawn_A_</dc:creator>
      <dc:date>2017-02-01T21:52:08Z</dc:date>
    </item>
    <item>
      <title>There are many posts</title>
      <link>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081218#M61710</link>
      <description>&lt;P&gt;There are many posts regarding this subject, I suggest you search the Internet for something like "get copy of image file from camera app in cordova phonegap" and take a look at what others have done.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 22:01:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/using-dropzone-js/m-p/1081218#M61710</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2017-02-01T22:01:59Z</dc:date>
    </item>
  </channel>
</rss>

