Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PATCH: AR-3095 Handle failed Image Attachment pipes
The problem is two-fold: 1. S3 authentication sometimes fails because we no longer pass a callback to `getSignedUrl()`. Were we to pass a callback, the expired, temporary credentials would be refreshed. This was broken by commit 90238b9 in apps/meteor/app/file-upload/ufs/AmazonS3/server.ts 2. When proxying the file from S3, if the authentication fails, or there is any other error leading to us not receiving the file, we blindly pass along the (probably empty) body as if that is the actual file. Solutions: 1. If the authentication fails, return 500. Fastly will retry and presumably succeed the second time around. Or the user can click "Retry" and likewise succeed. 2. If any other error occurs, return 500. Same consequences as above. Solution 2 is more catch-all. Solution 1 saves us from having to hit S3 needlessly.
- Loading branch information