如何附加PDF文件?

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 个赞

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 个赞

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

image

2 个赞

@merefield 是否有办法为所有用户启用 PDF,但仅用于私人消息?

不,至少不容易。

PM只是话题。如果启用PDF上传,它将适用于所有话题。

2 个赞

感谢 @pfaffman!关于按 TL 上传文档(非图片)的限制如何?

你好 Robert!我的社区的一位用户正试图在评论中附加 PDF(我看到了错误“Attachment Pena Network.pdf is missing”),但不起作用。我可以在 Discourse 中找到文件设置的位置,以便启用 PDF 上传?我很难找到它。

1 个赞

有一个单独的设置是针对员工的,但不是针对 tl 的。

@VVoPham 如果你在站点设置中搜索 upload,或许还能找到 extension。你也可以搜索 jpg 来查找以该值为值的设置。

2 个赞

太好了!找到了,并且我们成功上传了 PDF!:grin:

2 个赞

好的!您能否点击那个复选框,表示我的帖子回答了您的问题?

1 个赞

嗨 Jay,我很乐意帮忙。那个复选框在哪里?我可能在某个地方错过了它……

1 个赞

哦。抱歉。这不是您的话题,所以您没有那个选项。没关系。:person_shrugging:

2 个赞

哦,不,抱歉!希望你能跟进 Mpitily,这样他们就可以做到这一点,如果他们还没有做的话!:slightly_smiling_face:

2 个赞