Forem Creators and Builders 🌱

Discussion on: Implementing Video Feature

Collapse
 
cpluta profile image
Chris Pluta

Is this on the upload or download?

Also you reminded me that I need to write an update about a policy change we needed to do when downloading the file. It was inconsistent in who it worked for.

The missing step is on Cloudfront in the Behaviors you need to create a new Caching Policy. We need to do this to whitelist some headers for origin.

Everything can be default but you need to whitelist the following headers:

  • Origin
  • Access-Control-Request-Method
  • Access-Control-Request-Headers

Once you do that make sure its setup as the policy and save it. It will take somewhere between 5-20 minutes until it takes effect.

If you're still having issues please reach out again!

Collapse
 
lee profile image
Lee

It was on upload. Great I'll give those allowed headers a shot.

Thread Thread
 
cpluta profile image
Chris Pluta

If it was on Upload check out your Network tab and check the response. What we got was an error about HMAC-Sha1 was not supported.

The reason for that was because of what the region supported. We thought we could have used US-East-2 but in terms of upload it needed to be US-East-1 since that supported Sha1. If you really want to get into the code, it's in the s3_direct_upload dependency under the signature method which is hardcoded for sha1.

If your region does support Sha1 then make sure your CORs policy is set in your s3 container with the configuration defined under _Setup S3 Permissions for Upload _.