Looking for help on how to have a appery.io ionic 5 app upload images, files, videos etc. to aws S3. I am using aws DynamoDB thru API Express successfully and can get a presigned S3 URL thru API Express as well. My problem is using the presigned URL to upload a image/file. Tried fetch, httpClient etc. Some Guidence would be greatly appreciated.
Thank you
To work with binary data in API Express you can do the following:
Custom REST API
typePOST
method and Binary
for request bodyBinary request
as parameter value in SQL nodeThe second part of the question is how can you get the binary data if you have fileUrl
.
Create New > API Express service
Code
tab create a variable named buffer
of type Any
Data
tab add datasource for the imported API Express service. In Before send
mapping connect buffer
with body.data
Screen1
fetch(fileUrl).then(res => res.arrayBuffer()).then(arrayBuffer => {
this.buffer = arrayBuffer;
this.Apperyio.execDataService(this, "myAexService");
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.