Business Operation to Integrate with Amazon S3 , How to send File to Amazon S3 using HTTP Outbound
Hi All,
I created a Business Operation to Integrate with Amazon S3.
I have used HTTP Outbound Adapter for the same. Used Get method of Adapter Class.
Basically in a request I want to send Unique File Name and File and in Response I want to get Version ID and if operation was successful, then set flag to true.
I have created a class for request in that I have two properties, as shown Below :
Property fileName As %String;
Property file As %GlobalBinaryStream;
This is in my Operation Class
set pResponse = ##Class(SaveFileResponse).%New()
set fileName = pRequest.fileName
set file = pRequest.file
set tSC = ..Adapter.Get(.HttpResponse,"filename",fileName)
if (HttpResponse.StatusCode = 200) {
set pResponse.fileSaved = 1
set pResponse.fileVersionID = HttpResponse.ContentInfo
}
else {
set pResponse.fileSaved = 0
}
I have also created Business Operation in Production and configured URL and HTTP Configuration and SSL Configuration in Settings for the same.
Is this all correct ? Is my approch okay ?
Kindly help me on this .