@soleson wrote:
API Version: 2.3.0
Ulitmate goal is to record a file being uploaded to the database, then store that file in S3 using the following format: {s3bucket}/application/{table_record_primary_key}/{filename}
This is the process I am planning:
- Form posts required file & field data using multipart/form-data Content-Type.
- In Pre-Process POST script for the table, I check that the files array exists within the $_FILES array.
- In Post-Process POST script for the table, I want to upload using an internal API call to the S3 File Service.
I've found that if I add the folder and file structure as the payload, then it'll create an empty folder, but a file is never created. I do see the FILE array exists in the pre-process script for the S3 File Service. I've also found that if I base64_encode the file, it'll allow me to upload it, but with large files, this can be a resource hog.
I'm looking for help on how to pass the file post data from the original request, along with the resource ID of the inserted record over to the S3 Files Service so that a directory is created, then the binary file is added to that directory.
Thanks in advance for your help.
Posts: 1
Participants: 1