Skip to content

Commit

Permalink
#785_2 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schoicsiro committed Nov 14, 2023
1 parent 114dee4 commit 415134c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ class ApiController extends BaseController {
)

def getLocalImage() {
params.imageId = params.fileName
forward controller: "profile", action: "getLocalImage"
}

Expand Down Expand Up @@ -694,6 +695,7 @@ class ApiController extends BaseController {
)

def retrieveLocalThumbnailImage () {
params.imageId = params.fileName
forward controller: "profile", action: "retrieveLocalThumbnailImage"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ class ProfileController extends BaseController {
ImageType type = params.type as ImageType
//NB this imageId param already has the file extension on it, really the file name on disk
if (type == ImageType.STAGED) {
displayLocalImage("${grailsApplication.config.image.staging.dir}/", params.opusId, params.profileId, params.fileName, true)
displayLocalImage("${grailsApplication.config.image.staging.dir}/", params.opusId, params.profileId, params.imageId, true)
} else if (type == ImageType.PRIVATE) {
displayLocalImage("${grailsApplication.config.image.private.dir}/", params.opusId, params.profileId, params.fileName, true)
displayLocalImage("${grailsApplication.config.image.private.dir}/", params.opusId, params.profileId, params.imageId, true)
}
} catch (IllegalArgumentException e) {
log.warn(e)
Expand All @@ -428,9 +428,9 @@ class ProfileController extends BaseController {
ImageType type = params.type as ImageType
//NB this imageId param already has the file extension on it, really the file name on disk
if (type == ImageType.STAGED) {
displayLocalImage("${grailsApplication.config.image.staging.dir}/", params.opusId, params.profileId, params.fileName, false)
displayLocalImage("${grailsApplication.config.image.staging.dir}/", params.opusId, params.profileId, params.imageId, false)
} else if (type == ImageType.PRIVATE) {
displayLocalImage("${grailsApplication.config.image.private.dir}/", params.opusId, params.profileId, params.fileName, false)
displayLocalImage("${grailsApplication.config.image.private.dir}/", params.opusId, params.profileId, params.imageId, false)
}
} catch (IllegalArgumentException e) {
log.warn(e)
Expand Down

0 comments on commit 415134c

Please sign in to comment.