Mpitily
(FANOMEZANA)
2021 年5 月 28 日 16:14
1
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 个赞
Mpitily
(FANOMEZANA)
2021 年5 月 28 日 16:39
3
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:
I guess the new update added a hint about fixing this, so here is the full guide for those who face the same issue… it’s all about nginx:
1. Go to nginx folder:
cd /etc/nginx
2. Add this line to your nginx.conf file:
http {
...
client_max_body_size 4M;
}
This will allow nginx to accept files with a max size of 4 megabytes.
3. Restart nginx:
If you’re paranoid like me use run systemctl restart nginx
Or simply send the nginx restart signal by running nginx -s reload
Mpitily
(FANOMEZANA)
2021 年5 月 28 日 16:54
5
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:
2 个赞
sok777
(sok)
2022 年1 月 9 日 11:08
7
@merefield 是否有办法为所有用户启用 PDF,但仅用于私人消息?
pfaffman
(Jay Pfaffman)
2022 年1 月 9 日 11:34
8
不,至少不容易。
PM只是话题。如果启用PDF上传,它将适用于所有话题。
2 个赞
sok777
(sok)
2022 年1 月 9 日 11:43
9
感谢 @pfaffman !关于按 TL 上传文档(非图片)的限制如何?
VVoPham
(Vee VoPham (he/him))
2022 年3 月 14 日 21:15
10
merefield:
它在你的“文件”设置中:
你好 Robert!我的社区的一位用户正试图在评论中附加 PDF(我看到了错误“Attachment Pena Network.pdf is missing”),但不起作用。我可以在 Discourse 中找到文件设置的位置,以便启用 PDF 上传?我很难找到它。
1 个赞
pfaffman
(Jay Pfaffman)
2022 年3 月 14 日 22:17
11
有一个单独的设置是针对员工的,但不是针对 tl 的。
@VVoPham 如果你在站点设置中搜索 upload,或许还能找到 extension。你也可以搜索 jpg 来查找以该值为值的设置。
2 个赞
pfaffman
(Jay Pfaffman)
2022 年3 月 16 日 03:41
13
好的!您能否点击那个复选框,表示我的帖子回答了您的问题?
1 个赞
VVoPham
(Vee VoPham (he/him))
2022 年3 月 16 日 16:00
14
嗨 Jay,我很乐意帮忙。那个复选框在哪里?我可能在某个地方错过了它……
1 个赞
pfaffman
(Jay Pfaffman)
2022 年3 月 16 日 16:21
15
哦。抱歉。这不是您的话题,所以您没有那个选项。没关系。
2 个赞
VVoPham
(Vee VoPham (he/him))
2022 年3 月 16 日 16:37
16
哦,不,抱歉!希望你能跟进 Mpitily,这样他们就可以做到这一点,如果他们还没有做的话!
2 个赞