From 11b144c98e9ab1fb35d7cc1ba46a5af0b1aa4244 Mon Sep 17 00:00:00 2001 From: Jerome Benezech Date: Tue, 4 Aug 2015 08:55:12 +0700 Subject: [PATCH] Check if the url is not absolute before appending a / --- Resources/public/js/largefile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Resources/public/js/largefile.js b/Resources/public/js/largefile.js index 71f621e..b6cc698 100644 --- a/Resources/public/js/largefile.js +++ b/Resources/public/js/largefile.js @@ -110,7 +110,10 @@ var LargeFile = (function() { var container = document.getElementById( inputField.getAttribute('data-previewcontainer') ); - container.src = '/' + url; + if (url.substring(0,1) !== '/') { + url = '/' + url; + } + container.src = url; if (container.load) { container.load();