Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Displaying Images Stored in DB on Openshift

$
0
0
Hi All

I am developing and application that is running on openshift. The
application is still in heavy development, using wicket 6.14 at the moment.
I am running Wildlfy 8.1.0 and testing locally.

The problem I am facing is simply that the images that I am storing are not
being displayed on Openshift but work fine locally. I am retrieving the
image as a byte[] from the database and then displaying the Image.

I have tried using a simple ByteArray Resource like the following:

ThumbnailImageResource imageResource = new ThumbnailImageResource(new
ByteArrayResource("image/jpeg", userAccount.getProfileimage().getFile()),
150);
Image profileImage = new Image("profileImage", imageResource);
add(profileImage);

However on Openshift the image does not display. There is no error logged
just no image and the resource link does not seem to work either.

Any thoughts would be most helpful.

Thanks

David

Viewing all articles
Browse latest Browse all 5648

Trending Articles