fdfs 存儲節點storage安裝nginx,修改nginx配置文件
location /group1/M00/ { root /fdfs/storage/data; if ($arg_attname ~ "^(.+)") { #設置下載 add_header Content-Type application/x-download; #設置文件名 add_header Content-Disposition "attachment;filename=$arg_attname"; } ngx_fastdfs_module; }
例: 192.168.100.100:8888/group1/M00/00/15/dgECTl3d4CuAqGuAADaHFkU0005.jpg?filename=hello.jpg