Question Pushing CSV File from Progress Code to Amazon S3 Bucket

Mady

New Member
Hi All,

Requesting inputs/starting instructions on pushing file, generated through progress code, to S3 Bucket.
We are simply exporting a CSV and sending it to our email address at present. Instead of this, we want to push the file to S3 bucket and from there push it to another shared folder on a server.
Please suggest.

Thanks,
 

Cecil

19+ years progress programming and still learning.
Here is the Amazon s3 API documentation.


You could use the OpenEdge HTTP client or a curl shell command to push a file up to a s3 bucket.
 

Mady

New Member
Here is the Amazon s3 API documentation.


You could use the OpenEdge HTTP client or a curl shell command to push a file up to a s3 bucket.
Can you please suggest any example of how to do this. I am trying below and getting error "Could not locate method 'Put' with matching signature in class 'OpenEdge.Net.HTTP.RequestBuilder' (14457)".
Some direction about exact signature and syntax would be really helpful.

oRequest = RequestBuilder: Put('/my-image.jpg HTTP/1.1')
:Host('bucket-name.s3.us-east-1.amazonaws.com')
: Date('Wed, 12 Oct 2009 17:50:00 GMT')
:Authorization('authorization string')
:Content-Type('text/plain')
:Content-Length('11434')
:x-amz-meta-author('Janet')
:Expect('100-continue')
:Request.

oResponse = ClientBuilder:Build():Client:Execute(oRequest).
 

Stefan

Well-Known Member
If you view the documentation on the RequestBuilder you can see what the Put method needs:

Code:
OpenEdge.Net.HTTP.RequestBuilder Put (character, Object)    
OpenEdge.Net.HTTP.RequestBuilder Put (URI, Object)   
OpenEdge.Net.HTTP.RequestBuilder Put (URI, Object, character)

So you always need to provide a (JSON) object (it can be empty) as payload.
 
Top