PNG's a no show

Thanks @Jay!   

SVG images are run through an XML whitelist, any non-approved elements are removed.

https://github.com/discourse/discourse/blob/5d528f0d159a87ebbe266ff4f9c2a38d0b250669/lib/upload_creator.rb#L10

5 Likes

What Jay said above – yes it’s absolutely safe.

If you wanted a detailed explanation: The Docker image hosts the software (ruby, the code, postgres, etc) that your forum runs on. Discourse stores your data outside the image, so these images are safe to be shut down and upgraded when there’s a new version out. Your data (forum posts, users, site settings) will be restored when it restarts, and that will be mounted onto the new base image.

3 Likes

ok the forum’s back, the latest Discourse & Docker versions are installed.

But we’re still getting the new improved problem, where .pngs are visible yet trying to download .txt files (and other non-image files) to be displayed in a browser - we’re not getting the download/save window dialog (This change happened when the latest Discourse update was installed a few days ago). See this post on our forum:
https://forum.valentina-project.org/t/test-downloads-val-vit-txt-pdf

File sharing is really important in providing support to our user community.
Any thoughts on what could cause this?

OK after all that…we still have the problem that attachments are acting weird.

  1. pngs weren’t displaying

  2. After this week’s update the .pngs are displaying properly. But now downloads don’t work. Text files are opened in a browser tab like they’re an image file.

This is a known bug. Spoke with engineering and it is believed to be the same issue as Upload file name not kept on download.

2 Likes

Thanks @joshua. But How can this be a bug if .zip & .pdf files are downloaded correctly, but others aren’t? The download and display functions are working, the choice of whether to download or display the selected file is what’s a bit muddled.

Is there some method in the code which selects how to process each file type when the download icon is selected?
Can I get to it and make a custom change for our pattern & measurement & text files?

This post has links to each type of file, good for testing:
https://forum.valentina-project.org/t/how-to-make-sleeve-cap/1972/26

Your Discourse is a month old. Can you update to latest? Your downloading issues should be fixed.

2 Likes

Sorry for the delay, it was a Rails 5.x upgrade issue that took a while to work out.

1 Like

@slspencer I fixed this issue by turn on force HTTPS, how about you?