Problems uploading images with Safari (desktop)?

Is anyone else having problems lately uploading images to the forum using Safari for macOS? When I try, Discourse indicates that the upload is progressing, and I see data uploading on my bandwidth monitor, but while the upload seemingly completes (reaches 100% and then ends), there’s only an empty space where the internal Discourse link to the image should be, and a onebox link to nothing in the post:

[Uploading: Screen Shot 2022-06-19 at 11.48.26 PM.jpg…]()

Uploading: Screen Shot 2022-06-19 at 11.48.26 PM.jpg…

I do not see this issue on Safari for iOS or with macOS Firefox, and macOS Safari was working fine until a day or two ago. It doesn’t matter whether I drag and drop the image onto the editing box (“oneboxing” it) or use the file picker to insert it. Images are under the 4MB filesize limit and are plain vanilla JPG, GIF, or PNG files

I’ve tried rebuilding the browser cache, disabling the various Safari privacy features (third party cookies, trackers, etc.), and the blocking extensions that I use (AdGuard, DuckDuckGo Privacy Essentials), but still have the problem. I’m running Safari Version 15.5 (17613.2.7.1.8), which I’ve been using for well over a month now without issues. Any ideas?

Yours isn’t legacy, but the response to a post like yours points to this thing:

More weirdness; I can upload using macOS Safari Technology Preview Release 146 (Safari 15.4, WebKit 17614.1.14.10.6) without any difficulty.

![Screen Shot 2022-06-19 at 11.48.26 PM|690x425, 50%](upload://lvlPufsZqjoiA6Xadb7hbMpsLmh.jpeg)

I note that this reports a user agent string of

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15

…while the release version of Safari reports a user agent string of

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15

Perhaps the culprit is the technology that is in yours but not in that’s’s.

Tried changing the user agent string of release Safari to match that of the Technology Preview, but that didn’t help.

One two, one two, this is just a test …

1 Like

Have you tried opening the Javascript error console and seeing if any errors pop up when you try to upload?

I have no problem at all uploading images in Safari. I’m on macOS 12.4
My Safari version is also 15.5 (17613.2.7.1.8)

I am seeing several instances of the following upon page load:

[Error] Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy. (8, line 0, x6)

and then this:

[Warning] [THEME 10 'mst3k-social-links-clickable'] – "To prevent errors in tests, add a `pluginId` key to your `modifyClass` call. This will ensure the modification is only applied once." (discourse-4ab9d7fbd87dd29923ae2879a5bf19d6b71fe08809aa0babdecade2ce8864cb7.br.js, line 3985)

I’m seeing all of those (with slightly different wording on the errors: Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”) in Firefox 102b9 on Windows 11. Warning is same though.

Curious if anything pops up while trying to upload. Of course, sometimes JS just silently fails on bad functions too.

No messages popped up in the JS console during uploading.

Well, something somewhere has changed, and I am once again able to upload images using macOS Safari. Could be due to the macOS v12.5 and Safari v15.6 (17613.3.9.1.5) updates, or an adblock filter update, but I’m not about to downgrade anything just to find out.