mercredi 8 avril 2015

browser automatically adding relative path to base64 image data

i am trying to show thumbnails in base64 encoded form .This is how it looks ( angularjs + php ) :



<a ng-href="{{field.value.value_readonly}}">
<img src="{{field.value.thumb}}" />
</a>


however, when rendered on browser , it looks like this:



<a ng-href="/faisl30/http://localhost/faisl30//index.php?option=com_faicm&amp;task=getPilotEventFile&amp;idsub=14774&amp;userid=582&amp;filename=14774/582/bubbles.jpg" href="/faisl30/http://localhost/faisl30//index.php?option=com_faicm&amp;task=getPilotEventFile&amp;idsub=14774&amp;userid=582&amp;filename=14774/582/bubbles.jpg">
<img src="/faisl30/data:image/jpg;base64,/9j/4QD4RXhpZgAATU0AKgAAAAgABgEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgEoAAMAAAABAAIAAAE7AAIAAAAVAAAAZgITAAMAAAABAAEAAIKYAAIAAABzAAAAf...."
/>
</a>


as you can see it keeps inserting the "/faisl30/" ( relative path ) to both href and image src even though i am providing absolute path.


Any idea why it is happening and how to stop it ?


Aucun commentaire:

Enregistrer un commentaire