0

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 ?

Shrouk Khan
  • 1,440
  • 6
  • 27
  • 53
  • i have also tried ng-src and ng-data-src , in both cases "/faisl30/" got added autometically ! – Shrouk Khan Apr 09 '15 at 03:08
  • what php framework you using? – YOU Apr 09 '15 at 04:31
  • joomla. its not a problem in php as i verified correct response is returned. – Shrouk Khan Apr 09 '15 at 04:40
  • I see. try this one then - http://stackoverflow.com/questions/22018776/loading-image-src-using-a-variable-containing-base64-data-in-angularjs – YOU Apr 09 '15 at 04:44
  • i have already tried image-data-src="{{field.value.thumb}}" , but even then it comes up with a "/faisl30/" prefixed to it ! – Shrouk Khan Apr 09 '15 at 04:51
  • Just to rule out the obvious; have you tried dumping the raw content of `field.value.thumb` onto the page? I can't see why the relative path would be getting pushed on there, it feels more like the problem is that the relative path is already present at the time the value is bound. – gerrod Apr 09 '15 at 06:45
  • Plz it would be good if u can also post the controller – Reena Apr 09 '15 at 09:12

0 Answers0