Larger image/file uploads fail in forum

Issue description:

So discourse is using Uppy plugin for larger images, approx 520kb+ sizes, and it gives the error

Error: [Uppy] [10:08:46] 
DOMException {}
stack: "SecurityError: Failed to construct 'Worker': Script at 'http://support.symfonium.app/javascripts/media-optimization-worker.js' cannot be accessed from origin 'https://support.symfonium.app'.↵ at l.startWorker (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:1:8238)↵ at https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:1:7681↵ at https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:238:44719↵ at new e (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:238:44783)↵ at l.install (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:1:7573)↵ at l.ensureAvailableWorker (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:1:7520)↵ at l.optimizeImage (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:1:6411)↵ at o.optimizeFn (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:23:182034)↵ at o._optimizeFile (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:65:10325)↵ at q._join (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:80:33198)↵ at q.join (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:80:30860)↵ at p (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:221:41221)↵ at o.<anonymous> (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:221:41267)↵ at https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:65:10902↵ at o._optimizeSerial (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:65:10926)↵ at q._run (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:80:33336)↵ at q._join (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:80:33157)↵ at q.join (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:80:30860)↵ at p (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:221:41221)↵ at https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:221:41267↵ at J.el (https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:150:10474)↵ at https://support.symfonium.app/assets/chunk.d1a2c4dc70c15a65faf2.d41d8cd9.js:150:3142"
get stack: ƒ ()
set stack: ƒ ()
[[Prototype]]: DOMException
ABORT_ERR: 20
DATA_CLONE_ERR: 25
DOMSTRING_SIZE_ERR: 2
HIERARCHY_REQUEST_ERR: 3
INDEX_SIZE_ERR: 1
INUSE_ATTRIBUTE_ERR: 10
INVALID_ACCESS_ERR: 15
INVALID_CHARACTER_ERR: 5
INVALID_MODIFICATION_ERR: 13
INVALID_NODE_TYPE_ERR: 24
INVALID_STATE_ERR: 11
NAMESPACE_ERR: 14
NETWORK_ERR: 19
NOT_FOUND_ERR: 8
NOT_SUPPORTED_ERR: 9
NO_DATA_ALLOWED_ERR: 6
NO_MODIFICATION_ALLOWED_ERR: 7
QUOTA_EXCEEDED_ERR: 22
SECURITY_ERR: 18
SYNTAX_ERR: 12
TIMEOUT_ERR: 23
TYPE_MISMATCH_ERR: 17
URL_MISMATCH_ERR: 21
VALIDATION_ERR: 16
WRONG_DOCUMENT_ERR: 4
code: 18
get code: ƒ get code()
message: "Failed to construct 'Worker': Script at 'http://support.symfonium.app/javascripts/media-optimization-worker.js' cannot be accessed from origin 'https://support.symfonium.app'."
get message: ƒ get message()
name: "SecurityError"
get name: ƒ get name()
constructor: ƒ DOMException()
Symbol(Symbol.toStringTag): undefined
[[Prototype]]: Object

I’m no coder so I fed this to gpt, it said Uppy is being accessed at path with wrong protocol (http) for larger files causing the issue.

This happens when image is being uploaded without using the buttons at Screenshot section in topic creation.

Logs:

Upload description: It’s a forum issue, that I observe across multiple browsers and devices

Additional information:

I’m using Quests browser (chromium) cuz it supports extensions, and can get this debug info. I tried this on Chrome Android as well, I can’t say if it’s a different error, but the same behavior of getting stuck at processing upload.
On PC I use Zen (firefox), has the same issue

I tried to discuss this issue here, wasn’t sure if I should open a new topic for this since it wasn’t discussed further, and the topic seemed to lack any info besides symptom/behavior.

I also mentioned about the issue here

Reproduction steps:

Idk man, try to reply to this topic using an ss/image bigger than 600kb?

Media provider:

Any provider

Screenshots: