Joe Hardstaff:
Hiya,
I have implemented Uppy in our dev project and I have the uploads and downloads working just fine, which is great. I am having issues with the delete option. I have included the “s3:DeleteObject” in the permissions.
Is there any further guidance on this function?
Delfs:
The delete would normally happen from your back end. Is that what you’re doing?
Joe Hardstaff:
It uses a delete button in the front end table that shows the documents in the backend, I can delete the document record from the documents table, but it isn’t deleting from aws bucket.
Joe Hardstaff:
Uses the document delete handler on a utility hook
Joe Hardstaff:
It doesn’t store the document in the backend table, just the details of.
Jason Wood:
So it has nothing to do with Uppy or FMBetterForms. The first step would be to get it working in FileMaker. There is a delete example on my blog. You’re doing the same thing? If so, what header/body is returned by AWS? https://www.definedatabase.com/s3-object-storage-filemaker-container-alternative/
Joe Hardstaff:
I did use your Demo file Jason, very very helpful. Thank you.
On your blog it is not showing the top part of the code snippet, but I assume the top line that I can see is the top line of the snippet and the variables are pre set prior to this.
Jason Wood:
What variables are you referring to that are set prior to this?
Joe Hardstaff:
$bucket ; $region ; $path ; 60 ; $access_key ; $secret_key
Joe Hardstaff:
I know what they are and how to set them so no issue there.
Joe Hardstaff:
I think I’ll try and get this working backend in FM as you suggest and then adjust the BF script to use a new delete script as in your example.
Jason Wood:
Ah yes, those are intended to be substituted or set elsewhere.
Joe Hardstaff:
I got it working Jason. I used your methodology with a mix of the BF example scripts. The pre signed url was causing me issues, then I realised it had a 3 second time limit to delete. So when running it through the debugger and checking vars etc, it timed out, which took me some time to realise what it was doing. After that and a couple more tweaks it now works from the new front end via FM scripts in backend.