data transfer cost

I am testing an application where it needs to return an image as response my two option of doing it first: attach the image as a return payload after the run finish second: upload the image to s3 bucket then send the link as a return payload my questions: if I did the first option, what is the limit of return payload size, and first is this possible? and what is the cost per mb? If I did the second option, first is this possible? second, what is the cost of data transfer, I mean uploading to s3, how much is the cost per mb?
1 Reply
Encyrption
Encyrption4mo ago
You can return your images, in the JSON you return from the handler. You will have to BASE64 encode your images first. This will turn them into text you can include in JSON. To use said images you will have to BASE64 decode them to turn them back into an image. My understanding is that with asynchronous (run) endpoint the limit is 10MB and with synchronous (runsync) the limit is 20MB. There is no extra charge for data transfer (uploading). This is why I use s3 buckets.
Want results from more Discord servers?
Add your server