Skip to content

Commit bb03b0f

Browse files
committed
1 parent d57dae0 commit bb03b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grails-app/services/au/org/ala/merit/ImageService.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class ImageService {
2828
Map resp = webService.postMultipart(grailsApplication.config.getProperty('ecodata.baseUrl') + "document/createThumbnail", [size: size], imageIn, contentType, thumbnailFile.name, 'image')
2929
if (resp.statusCode == HttpStatus.SC_OK) {
3030
def thumbnailData = resp.resp
31-
if (thumbnailData instanceof InputStream) {
32-
new FileOutputStream(thumbnailFile).withStream { it << thumbnailData }
31+
if (thumbnailData instanceof byte[]) {
32+
new FileOutputStream(thumbnailFile).withStream { it << new ByteArrayInputStream(thumbnailData) }
3333
}
3434
}
3535
return thumbnailFile.exists()

0 commit comments

Comments
 (0)