gitlab 怎么修改单个文件大小
1个回答
展开全部
gitlab默认上传文件最大10M,如果大于10M,则需要做如下修改:
vim app/models/note.rb
找到如下行:validates :attachment, file_size: { maximum: 10.megabytes.to_i }
将10改为你想要的大小;
如果httpserver使用提nginx,则修改配置文件nginx.conf,在http中加入 client_max_body_size 50m, 这个值默认是1M。
此外,如果用eclipse的插件上传,报如下错:
Can't connect to any repository: http://10.210.92.69/bcop/bcop_si.git (An internal Exception occurred during push: http://10.210.92.69/bcop/bcop_si.git: 411 Length Required)
做如下修改:
Eclipse>Preferences>Team>Git>Configuration>Add Entry
Enter http.postBuffer as key and 524288000 as value (if 500M is enough)
vim app/models/note.rb
找到如下行:validates :attachment, file_size: { maximum: 10.megabytes.to_i }
将10改为你想要的大小;
如果httpserver使用提nginx,则修改配置文件nginx.conf,在http中加入 client_max_body_size 50m, 这个值默认是1M。
此外,如果用eclipse的插件上传,报如下错:
Can't connect to any repository: http://10.210.92.69/bcop/bcop_si.git (An internal Exception occurred during push: http://10.210.92.69/bcop/bcop_si.git: 411 Length Required)
做如下修改:
Eclipse>Preferences>Team>Git>Configuration>Add Entry
Enter http.postBuffer as key and 524288000 as value (if 500M is enough)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询