From fece16c7006fb4e1a1ef6d62927d71d7d00e1aee Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jan 2012 14:21:13 +0100 Subject: [PATCH] Only send filename to file.cache --- couchpotato/core/plugins/file/static/file.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/file/static/file.js b/couchpotato/core/plugins/file/static/file.js index 68b1996f..50458db6 100644 --- a/couchpotato/core/plugins/file/static/file.js +++ b/couchpotato/core/plugins/file/static/file.js @@ -17,12 +17,14 @@ var File = new Class({ createImage: function(){ var self = this; + + var file_name = self.data.path.replace(/^.*[\\\/]/, ''); self.el = new Element('div', { 'class': 'type_image ' + self.type.identifier }).adopt( new Element('img', { - 'src': Api.createUrl('file.cache') + self.data.path.substring(1) + '/' + 'src': Api.createUrl('file.cache') + file_name }) ) },