How to attach a PDF file?

Hello

We are using Discourse as a tool to exchange and share experiences.
I was going to publish PDF content but the file attachment only allows jpg, jpeg, png, gif, heic, heif, webp extensions.

Could someone give me a way to attach the PDF file in the platform please ?

Thanks

It’s in your Files settings:

In this example, only staff are allowed to upload pdf files.

1 Like

Thank you for your help.

I have changed the settings and now the PDF can be attached.
However, when I reach 50% of the download, it stops and gives this message:
“Sorry, there was an error sending the file. Please try again.”
I tried more than 5 times but it gives this again.

What would be the problem ? and how to fix it please ?

You might need to update your nginx config too if the files are very large:

Yes, after compressing the file, it worked !

Thanks a lot for your help !

1 Like

You can also try in first instance to increase this value:

image

2 Likes

@merefield Is there any way to enable PDF for all users but only for private messaging?

No. At least not easily.

PMs are just topics. If you enable pdf uploads it’ll be for all topics.

2 Likes

Thanks @pfaffman ! How about uploading docs (not images) limitations by TL?

Hi Robert! One of my community’s users is trying to attach a PDF in a comment (I see the error “Attachment Pena Network.pdf is missing”), and it’s not working. Where can I find the files settings in Discourse, so I can enable PDF uploads? I’m having a hard time locating it.

1 Like

There is a separate setting for staff, but not tl.

@VVoPham is you search the site settings for upload and maybe extension you should find it. You could also search jpg to find the settings that have that as a value.

2 Likes

Thanks! Found it, and we were able to upload PDFs successfully! :grin:

2 Likes

Great! Can you click that checkbox indicating that my post answered your question?

1 Like

Hi Jay, I’d be happy to. Where is that checkbox? I might be missing it somewhere…

1 Like

Oh. Sorry. It’s not your topic, so you don’t have that option. Never mind. :person_shrugging:

2 Likes

Oh no, sorry! Hopefully, you can follow up with Mpitily, so they can do this, if they haven’t already! :slightly_smiling_face:

2 Likes