What steps will reproduce the problem? 1. HTML Code: <a href="./image.jpg?nocache=randomcode" class="nyroModal">Open</a>
What is the expected output?
Image in modal window
What do you see instead?
File binary content
What version of the product are you using? On what operating system?
Last version, OS independent.
Please provide any additional information below.
No comments needed.
- issue.gif 34.42KB
Comment #1
Posted on Aug 12, 2008 by Massive Camelgood catch. here is a work around until that can be further looked at. this is just one way to work around it. i overloaded the processhandler which looks for that and will override and set the type to image. now this will only work if your urls have extensions. if you are using a servlet or some form of redirection like 'domain.com/image/123' is an iamge then this will have to be altered or hard coded to look for some form of url like any thing 'domain.com/images/*' should have type set to image.
$(function() { $.fn.nyroModal.settings.processHandler = function(settings) { var from = settings.from; if (!settings.type && from && from.href) { alert( 'type should be image: '+settings.type + '\n' + "need to determine if image manually"); var arr = from.href.split('?'); //if carrying extra stuff if(arr.length>1){ var newArr=arr[0].split('.'); var newType=settings.type; alert('extension is: ' + newArr[newArr.length-1]); switch(newArr[newArr.length-1].toUpperCase()){ case 'IMG': case 'JPG': case 'JPEG': case 'PNG': case 'GIF': newType='image'; break; default: newType=settings.type; } alert("new type is " + newType); $.nyroModalSettings({ type: newType//, //height: 355, //any other settings could be overloaded here //width: 425 }); } } };
});
- binary_image_cnt.zip 84.4KB
Comment #2
Posted on Aug 12, 2008 by Massive Camel(No comment was entered for this change.)
Comment #3
Posted on Oct 22, 2008 by Swift PandaIn the release 1.3.0, the extImg setting is replaced by regexImg. With that, i'm pretty sure you'll be able to do whay you need (and probably more!)
Status: Fixed
Labels:
Type-Defect
Priority-Medium