25
Views
2
Comments
[AWS_S3_Connector] Download file server side from S3 is getting 0 bytes
AWS_S3_Connector
Forge asset by OutSystems Labs
Application Type
Reactive

Hi, I'm trying to download a file from S3 on server side.

I tried to use both AWSSimpleSTorage and AWS_S3_Connector but without success.

The issue is that I get always an empty binary despite the file is some MB.

This is what I get for example with AWSSimpleStorage:

{"BucketName":<EVICTED>,"Key":"upload-folder/<EVICTED>","Headers":{"ContentLength":2771899,"ContentType":"text/csv"},"Expiration":{"ExpiryDateUtc":"0001-01-01T00:00:00Z"},"LastModified":"2024-10-22T08:33:23Z","ETag":"\"<EVICTED>\""} 


Have you had a chance to get a file from S3 with ODC?

With O11 all is working properly

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi, Iam the maintainer of the AWSSimpleStorage component.

I left returning a binary data intentionally out. Why is that? External Logic functions have a maximum request AND response payload size of ~6MB. That is a limitation of the underlying Lambda Service and not ODC.

Actually I was event thinking of not including the PutObject as well :-)

To ensure that upload and download work for even larger files I suggest you use a Presigned Url- YOu can use that URL either client side to perform a up/download using fetch and even within your application using a rest consume (you have to dynamically change the request path).

Stefan

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi, I have updated my AWSSimpleStorage component. The GetObject function now returns a new property Content with the binary data of the file. (Version 0.7.0). But mind the 5.5MB response limit of external logic functions :-)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.