PDA

View Full Version : Show Local image in Template



gustavo21
6 Jun 2011, 8:18 PM
Hello, im trying to show a picture in a panel on my app. The problem is showing from local disk or network disk. We have pictures of all employees, arround 4000. The storage is in a windows active directory mapped folder, -> G:\
If i put some pictures on the folder of my app, works ok.

I have this code:


{
xtype: 'panel',
border: false,
frame: true,
title: 'Datos Personales',
region: 'east',
ref: '../detalles',
width: 400,
plugins: [Ext.ux.PanelCollapsedTitle],
collapsible: true,
collapsed: true,
autoScroll: true,
border: false,
split: true,
tpl: ['<img src="file:///\\server\Sistemas\Fotos\{foto}.JPG" width="200" />',
]
}I tried this to: file:///G|/Sistemas/Fotos/{foto}.JPG and file:///G:/Sistemas/Fotos/{foto}.JPG but doesn't work!

Thanks!!

In firebug the picture is showed OK

skirtle
6 Jun 2011, 9:51 PM
You're going to run into all sorts of browser security policy issues trying to do it that way. You need to proxy the images through the same webserver as the rest of your page.

gustavo21
7 Jun 2011, 7:02 AM
You're going to run into all sorts of browser security policy issues trying to do it that way. You need to proxy the images through the same webserver as the rest of your page.

Please, tell me how could i do it...


Thanks