Created
September 19, 2013 20:42
-
-
Save JumboLove/6629544 to your computer and use it in GitHub Desktop.
Check if Image Exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imgFile : dw.io.File = dw.io.File('/Catalogs/'+catalogId+'/default/' +imagelocation); | |
var imgFileExists : Boolean = imgFile.exists(); | |
//OR | |
var img = File('/LIBRARIES/Sitename/default/images/'+mycustomobject.custom.name); | |
if (!img.exists()) // replace this image url with a default one; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment