For context, I have a file upload using direct upload/presign that works fine in my view/React component. I now need to add the same functionality via API so I have created an endpoint that returns the presign information and a second endpoint that takes the file details from the direct upload in the preceding request and update the record. The validation/plugin and config are identical in both cases.
I’m using Postman to test the endpoints. When I send the file to S3 via postman, I can see the file is uploaded to the bucket, I can download the file and everything looks correct. I then take the filename/id (the same from presign response) and send to my second endpoint to update the record, I get a failed validation, even though the file is valid and can be uploaded via my existing controller.
If I manually upload a file to S3 and use the file name in my controller, the record is correct updated and the attachment is added as expected.
The issues seems to be when uploading the file using the presign info, the file gets modified(?) somehow causing a failure in validation.
Any idea of what could be causing the issue?