这个是服务器配置的问题, 你用网页也不能上传的. 需要配置网页服务器/nginx/apache, 分享一个我的nginx配置;
server {
server_name your.domain.com.cn;
proxy_set_header X-Forwarded-For $remote_addr;
location /{
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
#used for view/edit office file via Office Online Server
client_max_body_size 0;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
}
location /media {
root /home/youruserhome/seafile/seafile-server-latest/seahub;
}
}
需要修改的地方:your.domain.com.cn
, root /home/youruserhome/seafile/seafile-server-latest/seahub;
其中端口配置在
$ cat seafile.conf
[fileserver]
port=8082
其他好像我都用的默认配置.
最后可以参考官方nginx配置和这里官方服务器不能上传文件问题