Theme asset uploader "remembers" wrong file

Hello Discourse team. First bug report, I apologize if I’ve made any mistakes.

  1. Upload a font foo.woff in the asset uploader in theme settings
  2. Delete the asset in the theme settings
  3. Rename the font locally to bar.woff
  4. Upload the renamed font

Expected behavior: Discourse accepts new upload and its name is displayed as bar.woff
Buggy behavior: The uploaded file’s name is displayed as foo.woff

Note: I am using BackBlaze B2 as my S3 assets storage in conjunction with BunnyCDN.

I’m not sure whether the bar.woff is being ignored and instead reassociated with foo.woff, or if the bar.woff is being renamed to foo.woff.

1 Like

Uploaded files (and images) are matched by checksum, so my guess is that it thinks you’re uploading the same file again. If there’s any way to change the checksum of the file, I suspect that would fix the problem, but I realize modifying a font file is a bit … weird.

1 Like

Yeah, fontland seems like a frightening place. Thanks, I’m glad there’s a reasonable explanation, though. It sounds like the checksum matching might have the added benefit of preventing wasted storage because of duplicate uploads, which would be cool if true.

1 Like