Here the updated s3 library. You have to edit the action file by hand since the new options are not available in the UI. Unzip the file in lib/modules
.
s3.zip (1.1 KB)
The putFile action has contentType and contentDisposition as extra options, default it will detect the contentType automatically by the file extension. Here my example:
{
"name": "putFile",
"module": "s3",
"action": "putFile",
"options": {
"provider": "digitalOcean",
"bucket": "wapplertest",
"path": "/public/assets/dummy.pdf",
"contentDisposition": "attachment",
"key": "dummy.pdf",
"acl": "public-read"
},
"outputType": "boolean"
}
I also added a new action to the s3 module, it will allow you to download the file using the server action, this works around the CORS problem. You then use the server connect url instead of the s3 url in the download component.
Usage:
{
"name": "downloadFile",
"module": "s3",
"action": "downloadFile",
"options": {
"provider": "digitalOcean",
"bucket": "wapplertest",
"key": "dummy.pdf"
}
}