Fetch the repository succeeded.
This action will force synchronization from phachon/gis, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
_
____ _ (_) _____
/ __ / / / / ___/
/ /_/ / / / (__ )
\__, / /_/ /____/
/____/
go 实现的图片服务, 提供上传, 存储, 自动裁剪, 下载等功能
下载最新版本的二进制程序,下载地址:https://github.com/phachon/gis/releases
gis.exe
# 指定配置文件启动
gis.exe --conf config.toml
./gis
# 指定配置文件启动
./gis --conf config.toml
[listen]
# 监听上传 server
upload="127.0.0.1:8087"
# 监听下载 server
download="127.0.0.1:8088"
[upload]
form_field="upload" // 表单提交字段
allow_type = [".jpg", ".jpeg", ".png"] // 允许上传的图片格式
max_size = 2048 // 图片的最大上传大小 KB
root_dir = "upload" // 图片上传根目录
filename_len = 16 // 图片保存文件名字符串长度
dirname_len = 4 // 目录树的目录名长度
thumbnails = ["200_200", "300_300", "200_400"] // 要生成的缩略图裁剪尺寸 width_height
[download]
# 下载的地址 协议://域名:端口
uri = "http://test.com:8088"
[appname] // appname 用于授权,可多个,app_key 需要和 客户端上传的 token 保持一致
[appname.test]
app_key = "ad%4a*a&ada@#ada"
[appname.test1]
app_key = "sd(4a*yu&dai#9d3"
{
"code": "1", // 1:success, 0:error
"message": "", // error message
"data": {
"image": "http://test.com:8088/image/LYEDBYKAFGGRJUFL.png"
"image_200_200": "http://test.com:8088/image/LYEDBYKAFGGRJUFL_200_200.png"
"image_200_400": "http://test.com:8088/image/LYEDBYKAFGGRJUFL_200_400.png"
"image_300_300": "http://test.com:8088/image/LYEDBYKAFGGRJUFL_300_300.png"
}, // server image url
}
token = md5(appname+appKey)
欢迎提交意见和代码,联系方式 phachon@163.com
MIT
Create By phachon@163.com
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。