Where to put custom files for site customizations?

(Pluranium) #1

Hi for my site customizations I need to place a few font files on my discourse server. Also would like to have the option to place JS files on the server so I don’t have paste it verbatim into the head HTML. Where in the folder hierarchy would I put those? Inside the uploads folder? Any other place? Thanks!!

(Rafael dos Santos Silva) #2

There is a topic named: “READ ME FIRST: Admin Quick Start Guide”. Try reading it.

(Pluranium) #3

Hi thanks for the reply. Ok so I assume then “Assets for the site design” is the recommended way to do it for all file types? I’d need to enable all occurring file extensions for all users in the admin settings then upload each file separately to a post I assume, then disable file extensions again?

(cpradio) #4

yes, that is what you will want to do.

(Pluranium) #5

Ok thanks so did that but now I am having a problem with an .svg font file. Discourse refuses to upload it saying “Sorry, but we couldn’t determine the size of the image. Maybe your image is corrupted?”. Is there a way around that?

(Pluranium) #6

Ok I ended up changing the file extension on that file to .svg2, uploading it, then logged into server, located the file (in /var/discourse/shared/standalone/uploads/default/original/1X) and changed it back to .svg (and in the post as well). Kinda tedious but worked :slight_smile:

(cpradio) #7

Be sure to change the link to the attachment to reflect the name properly too, as there is a job that runs and removes unreferenced files from the uploads directory.

(Pluranium) #8

Thanks for the tip - yes did that as I was suspecting Discourse might be clever like that. :grin:

(Keith) #9

Is this still the suggested way to store server side / admin assets?