留言板

Saving Profile Images

Victor Lee,修改在12 年前。

Saving Profile Images

New Member 帖子: 5 加入日期: 11-2-23 最近的帖子
Hi Liferians,

I'm writing a program to read a set of images direct from a folder, then store it in the Liferay database users. I have figured most things out, but need with which method of conversion to binary Liferay uses. I've tried using ToBase64String but I don't think it's right, I compared it with the binary stored in the DB using Liferay's profile image upload
and it's different.

Any ideas?

Cheers everyone.
thumbnail
Sandeep Nair,修改在12 年前。

RE: Saving Profile Images

Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Maybe this post will help.

http://www.liferay.com/community/forums/-/message_boards/message/303184

Take a look at ImageLocalServiceImpl
Victor Lee,修改在12 年前。

RE: Saving Profile Images

New Member 帖子: 5 加入日期: 11-2-23 最近的帖子
Hi Sandeep,

Thanks for reply... we tried it but still doesn't work, much appreciated though.

Will post here if we managed to find the solution.
Victor Lee,修改在12 年前。

RE: Saving Profile Images

New Member 帖子: 5 加入日期: 11-2-23 最近的帖子
Hi All,

Really hit a road block here so any help or suggestions would be much appreciated.

Basically I'm writing a program to read a set of images direct from a folder, then store it in the Liferay database users. We identify the images with the ID of the users.

The problem is, I cannot figure out what format the images are stored in Liferay's database. So what I'm trying to is,

read the image -> convert into Liferay image format -> store in Liferay database

Anyone knows what format I need to convert to, or have a better suggestion how to achieve my objective?