I need to develop a system in which a requester will upload an outlook *.msg file having approval for the request. How can I save(Insert) this *.msg file in PostgreSql row of approval table. The business logic is developed in Java.
You should store email messages as bytea
fields, because they might be in any text encoding. So you would:
Create a ByteArrayInputStream
that points to the message file; and
Use a JDBC parameterized INSERT
or UPDATE
, inserting the data with PreparedStatement.setBinaryStream(...)
into a bytea
field.
See:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.