EasyUI Forum
May 17, 2024, 07:15:26 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Filebox with Fakepath  (Read 20713 times)
mendozada
Newbie
*
Posts: 9


View Profile
« on: March 19, 2016, 01:45:09 PM »

Hello, could someone tell me how to do to copy a picture to my server because I can not find the solution how.
The problem is when I get the picture using FileBox, In IE gives me the right direction C: \ Photo \ Image1.jpg but CHROME and Maxthon C: \ fakepath \ Image1.jpg
I have not tried it in Firefox.

But I would like to do it from any browser.

Code:
						<td valign="baseline" style="padding:10px" >
<label style="vertical-align:Top" >Foto:</label>
<img id="DP_Foto" name="DP_Foto" style="width:150px; height:150px "/>
<div class="fitem">

<input id="fb" name="DP_fb" class="easyui-filebox" style="width:200px" data-options="prompt:'Ingrese Foto...',
onChange: function(value){
var f = $(this).next().find('input[type=file]')[0];

if (f.files && f.files[0]){
var reader = new FileReader();

reader.onload = function(e){
$('#DP_Foto').attr('src', e.target.result);
console.log(e.target.result);
}
reader.readAsDataURL(f.files[0]);
}
}

">

</div>
</td>

greetings and thanks Wink
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 19, 2016, 06:31:24 PM »

Due to the security reasons, the browser has no access to the file system. It  stops you for getting the real path from the client computer.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!