Index: BL/Prod/ImageLinkImport/BlumImagesVoorAdminImporteerder.cls.xml =================================================================== diff -u -r68104 -r68108 --- BL/Prod/ImageLinkImport/BlumImagesVoorAdminImporteerder.cls.xml (.../BlumImagesVoorAdminImporteerder.cls.xml) (revision 68104) +++ BL/Prod/ImageLinkImport/BlumImagesVoorAdminImporteerder.cls.xml (.../BlumImagesVoorAdminImporteerder.cls.xml) (revision 68108) @@ -152,21 +152,30 @@ ;Set ImageLink.AspectRatio = "" ;Set ImageLink.ScaleFactor = "" - #dim WebImageFileName As %String = ImageFileName - Set VisueelType = "W" ; Web - Do ..AddLink(ImageLink, VisueelType, WebImageFileName, ImageSize, $$$True) - - #dim ThumbnailImageFileName As %String = ##class(TECH.StringUtils).Replace($$$UCase(ImageFileName), "\W\", "\T\") - If ..FileUtils.FileExists(ThumbnailImageFileName) { - Set VisueelType = "T" ; Thumbnail - Do ..AddLink(ImageLink, VisueelType, ThumbnailImageFileName, ImageSize, $$$False) + If ($$$UCase(ImageFileName) [ "\BLUM\W\" ) { + + // Standaard (WEB) image-link toevoegen + #dim WebImageFileName As %String = ImageFileName + Set VisueelType = "W" + Do ..AddLink(ImageLink, VisueelType, WebImageFileName, ImageSize, $$$True) + + // Thumbnail image-link toevoegen, indien bestand bestaat + #dim ThumbnailImageFileName As %String = ##class(TECH.StringUtils).Replace($$$UCase(ImageFileName), "\W\", "\T\") + If ..FileUtils.FileExists(ThumbnailImageFileName) { + Set VisueelType = "T" + Do ..AddLink(ImageLink, VisueelType, ThumbnailImageFileName, ImageSize, $$$False) + } + + // SVG (Vectorieel) image-link toevoegen, indien bestand bestaat + #dim VectorieelImageFileName As %String = ##class(TECH.StringUtils).Replace($$$UCase(ImageFileName), "\W\", "\V\") + Set VectorieelImageFileName = ##class(TECH.StringUtils).Replace(VectorieelImageFileName, ".JPG", ".SVG") + If ..FileUtils.FileExists(VectorieelImageFileName) { + Set VisueelType = "V" + Do ..AddLink(ImageLink, VisueelType, VectorieelImageFileName, ImageSize, $$$False) + } } - - #dim VectorieelImageFileName As %String = ##class(TECH.StringUtils).Replace($$$UCase(ImageFileName), "\W\", "\V\") - Set VectorieelImageFileName = ##class(TECH.StringUtils).Replace(ImageFileName, ".JPG", ".SVG") - If ..FileUtils.FileExists(VectorieelImageFileName) { - Set VisueelType = "V" - Do ..AddLink(ImageLink, VisueelType, VectorieelImageFileName, ImageSize, $$$False) + Else { + Do ##class(TECH.Exceptions.InvalidInputException).Throw("VoegToeProductImageLinks: ongeldige ImageFileName '"_ImageFileName_"'. De subdir moet '\BLUM\W\' bevatten om een correcte import te garanderen.") } #dim SaveStatus As %Status = ImageLink.%Save()