<?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 If it cannot find the file in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028476#M41059</link>
    <description>&lt;P&gt;If it cannot find the file for uploading, you might be having trouble accessing the root directory on your device.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 1.5;"&gt;Please refer to this stackoverflow posting:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/21321335/intel-xdk-directory-browsing" style="font-size: 12px; line-height: 1.5;"&gt;http://stackoverflow.com/questions/21321335/intel-xdk-directory-browsing&lt;/A&gt;&lt;/P&gt;

&lt;P style="font-size: 12px;"&gt;The second answer by xmnboy should give you a clue on how to go about this.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2015 17:39:17 GMT</pubDate>
    <dc:creator>Anusha_M_Intel1</dc:creator>
    <dc:date>2015-06-05T17:39:17Z</dc:date>
    <item>
      <title>Xdk audio record and upload do not work</title>
      <link>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028475#M41058</link>
      <description>&lt;P&gt;&lt;BR /&gt;
	Good morning everyone&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	I m working on a iphone mobile application where i need to record audio and send the audio file to my server&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	I work with the "phonegap &lt;SPAN style="font-size: 13.0080003738403px; line-height: 11.1497144699097px;"&gt;audio&lt;/SPAN&gt;"&amp;nbsp;intel xdk demo provided with the xdk software and when i try to upload the audio file after record&lt;BR /&gt;
	&amp;gt; i have always the same error message &amp;gt; "ERROR uploading file Cannot find the file for upload"&lt;/P&gt;

&lt;P&gt;I've tried&amp;nbsp;many differents solutions :&amp;nbsp;&lt;BR /&gt;
	&amp;gt; i use&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 11.1497144699097px;"&gt;intel.xdk.file.uploadToServer function and it work for the pictures files but not for the audio&lt;BR /&gt;
	&amp;gt; i use the media type &amp;gt;&amp;nbsp;audio/x-wav to upload&amp;nbsp;&lt;BR /&gt;
	&amp;gt; i v tried to add "intel.xdk.webRoot" to my source path audio file but its dont help&lt;BR /&gt;
	&amp;gt; i have tried other types of audio demos based on cordova but no one worked &amp;gt; i have other errors of audio recording&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Here is my javascript upload code:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var url= intel.xdk.webRoot+audioFileUrl&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;intel.xdk.file.uploadToServer(url,serverRoot+"mobileTools/upload.php", "", "&lt;SPAN style="font-size: 13.0080003738403px; line-height: 11.1497144699097px;"&gt;audio/x-wav&lt;/SPAN&gt;", "updateUploadProgress");&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	The PHP&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;lt;?php&lt;/P&gt;

&lt;P&gt;ob_start();&lt;BR /&gt;
	echo "&amp;lt;pre&amp;gt;";&lt;BR /&gt;
	print_r($_FILES);&lt;BR /&gt;
	print_r($_GET);&lt;BR /&gt;
	print_r($_POST);&lt;/P&gt;

&lt;P&gt;echo "&amp;lt;/pre&amp;gt;";&lt;/P&gt;

&lt;P&gt;print_r("file type: " . $_FILES["Filedata"]["type"]);&lt;/P&gt;

&lt;P&gt;$allowedExts = array("gif", "jpeg", "jpg", "png");&lt;BR /&gt;
	$temp = explode(".", $_FILES["Filedata"]["name"]);&lt;BR /&gt;
	$extension = end($temp);&lt;BR /&gt;
	if ((($_FILES["Filedata"]["type"] == "image/gif")&lt;BR /&gt;
	|| ($_FILES["Filedata"]["type"] == "image/jpeg")&lt;BR /&gt;
	|| ($_FILES["Filedata"]["type"] == "image/jpg")&lt;BR /&gt;
	|| ($_FILES["Filedata"]["type"] == "image/pjpeg")&lt;BR /&gt;
	|| ($_FILES["Filedata"]["type"] == "image/x-png")&lt;BR /&gt;
	|| ($_FILES["Filedata"]["type"] == "image/png"))&lt;BR /&gt;
	&amp;amp;&amp;amp; ($_FILES["Filedata"]["size"] &amp;lt; 9999999999)&lt;BR /&gt;
	&amp;amp;&amp;amp; in_array($extension, $allowedExts))&lt;BR /&gt;
	&amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; if ($_FILES["Filedata"]["error"] &amp;gt; 0)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; echo "Return Code: " . $_FILES["Filedata"]["error"] . "&amp;lt;br&amp;gt;";&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; else&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; echo "uploads: " . $_FILES["Filedata"]["name"] . "&amp;lt;br&amp;gt;";&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; echo "Type: " . $_FILES["Filedata"]["type"] . "&amp;lt;br&amp;gt;";&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; echo "Size: " . ($_FILES["Filedata"]["size"] / 1024) . " kB&amp;lt;br&amp;gt;";&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; echo "Temp file: " . $_FILES["Filedata"]["tmp_name"] . "&amp;lt;br&amp;gt;";&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; if (file_exists("uploads/" . $_FILES["Filedata"]["name"]))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; echo $_FILES["Filedata"]["name"] . " already exists. ";&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; else&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; move_uploaded_file($_FILES["Filedata"]["tmp_name"],&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; "uploads/" . $_FILES["Filedata"]["name"]);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; echo "Stored in: " . "uploads/" . $_FILES["Filedata"]["name"];&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; }&lt;BR /&gt;
	else&lt;BR /&gt;
	&amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; echo "Invalid file";&lt;BR /&gt;
	&amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; $data=ob_get_clean();&lt;BR /&gt;
	$fp=fopen("debug.txt","w+");&lt;BR /&gt;
	fputs($fp,$data);&lt;BR /&gt;
	fclose($fp);&lt;BR /&gt;
	?&amp;gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	I work on the last version of iphone app preview 2.3.3 and the last PC xdk software version&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	I you have some help this can save my life :)&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks you&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2015 15:19:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028475#M41058</guid>
      <dc:creator>Claude_M_</dc:creator>
      <dc:date>2015-06-05T15:19:16Z</dc:date>
    </item>
    <item>
      <title>If it cannot find the file</title>
      <link>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028476#M41059</link>
      <description>&lt;P&gt;If it cannot find the file for uploading, you might be having trouble accessing the root directory on your device.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 1.5;"&gt;Please refer to this stackoverflow posting:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/21321335/intel-xdk-directory-browsing" style="font-size: 12px; line-height: 1.5;"&gt;http://stackoverflow.com/questions/21321335/intel-xdk-directory-browsing&lt;/A&gt;&lt;/P&gt;

&lt;P style="font-size: 12px;"&gt;The second answer by xmnboy should give you a clue on how to go about this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2015 17:39:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028476#M41059</guid>
      <dc:creator>Anusha_M_Intel1</dc:creator>
      <dc:date>2015-06-05T17:39:17Z</dc:date>
    </item>
    <item>
      <title>Here's a direct link to the</title>
      <link>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028477#M41060</link>
      <description>&lt;P&gt;Here's a direct link to the answer Anusha is refering to: &lt;A href="http://stackoverflow.com/a/21392617" target="_blank"&gt;http://stackoverflow.com/a/21392617&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2015 23:43:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Xdk-audio-record-and-upload-do-not-work/m-p/1028477#M41060</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2015-06-05T23:43:10Z</dc:date>
    </item>
  </channel>
</rss>

