How to send PDF file to AppServer progress?
3 answers
It depends on the version of progress you are using, if you are using v9 then you will need to use small chunks of raw data passed across segments. With OpenEdge (maybe 10.1B) we got CLOB and BLOB support, you can create a procedure that takes a temporary table as an argument.
It also depends on your calling language. For .NET and Java this will translate into a byte array.
For your server application, create a procedure similar to the following:
def temp-table ObjectTransfer no-undo
field Code as char
field Number as int
field DataContent as blob
field MimeType as char.
procedure AddObjectData:
def input param table for ObjectTransfer.
def var k as int no-undo.
for each ObjectTransfer:
find last ObjectTable no-lock
where ObjectTable.Code = ObjectTransfer.Code
no-error.
if avail ObjectTable then
k = ObjectTable.Number + 1.
else
k = 1.
create ObjectTable.
assign
ObjectTable.Code = ObjectTransfer.Code
ObjectTable.Number = k
ObjectTable.MimeType = ObjectTransfer.MimeType
ObjectTable.DataContent = ObjectTransfer.DataContent
.
end.
end procedure.
Generate proxies, you will call this from .NET and Java using a simple byte array as the input temp table datatype.
+2
source to share