Rails 6.1 Active Text Javascript errors
I am making an article section in my Rails app. For this reason I thought Active Text would be a good idea. I have added it as per the Rails Guides as per https://guides.rubyonrails.org/action_text_overview.html but when i try to upload an image i get the following errors:
Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)
and also
Uncaught Error: Direct upload failed: Error creating Blob for "foxes.jpg". Status: 422
at AttachmentUpload.directUploadDidComplete (attachment_upload.js:37)
at BlobRecord.callback (activestorage.js:875)
at BlobRecord.requestDidError (activestorage.js:760)
at BlobRecord.requestDidLoad (activestorage.js:754)
at XMLHttpRequest.<anonymous> (activestorage.js:728)
This seems to happen on every environment apart from development. I am also using AWS S3 and Cloudfront and i think the settings are all good for that.
Anyone else tried ActiveText, S3 and Cloudfront?
Thanks