1
Vote

URL issue on Azure

description

If you deploy to the Azure Cloud the image files will be uploaded to the Blob Store.
However the blob file references are outside of the site domain ( e.g. mystorage.blob.core.windows.net/blabla) so the automatic application path replacement isn't enough. See Fields.Contrib.MediaPicker.Edit.cshtml:

var url = '~/' + data.img.src.substr(applicationPath.length);

Better solution is to check if the path is within the app path:

var url = '~/' + data.img.src.substr(applicationPath.length);
if (applicationPath.toLowerCase() != data.img.src.substr(0, applicationPath.length).toLowerCase())
                url = data.img.src;

comments