曾经是一名学生,现在是一名车辆🚄工程师。
- 编程是爱好,不是职业。
- 距离学习第一门编程语言
Pascal
已经 10 年了 - 使用 Vue 已经 3 年了
- 学习 Golang 已经 2 年了。
- 当然还有学了 5 年的世界上最好的语言 PHP。
Repos:
- 🕊 auxpi 融合多家 API 的新一代图床
🍭 集合多家 API 的新一代图床
License: GNU General Public License v3.0
我按照你的文档开启了微博图床,设置用户名密码之后前台上传后提示:无法获取第三方图床 URL。怎么解决啊?
经过这3天来的测试,在nginx的服务器上,如果使用http(80端口)来上图床网站,那么一切正常,很少会出现什么问题。但是,如果使用的是https(443端口)的话,那么nginx服务器端很容易对一部分图片返回400 Bad Request的错误。这错误发生频率很高,但帮助文档里,nginx的配置文档只写了80端口(仅http服务)。希望作者大大能在帮助文档里添加一下对https的优化支持,毕竟现在https是大趋势。我测试https的结果是——目前对于单张图片上传,10M以上的大图会100%报错,10M以下的单图上传一般没事。如果是批量上传小图,则图片数量多时会有一部分报错,图片平均体积越大,报错比例越高,我怀疑也同样是在上传图片总体积超过10M后开始报错……报错后需要重新上传,但重传时也可能再次报错……有时需要重传好几次才能全部传好,很麻烦……
不想让本地为默认图床,后台设置sina的,前台不生效。还是本地的,
小白git pull操作有时候有点尴尬
用户注册后邮件并没有发送
确认了邮件配置正确
然后我关掉了邮箱
发现删除用户提示管理员无法删除管理员
明明是普通用户·-·
5.7的mysql
请问一下如果没有数据库的话默认是无法进入后台的吧
大佬,目前遇到两个问题
1、如果使用搜狗图床上传的话,后台所有图片处无法解析
返回的链接是https://我的域名/api/proxy?url=https://img01.sogoucdn.com/app/a/图片连接
这种格式就导致了后台所有图片的搜狗图片无法解析,显示裂开图片
2、还有个是百度图床前台传完了以后,会显示连接为https://image.baidu.com/search/down?tn=download&url=
并不能正确的返回图片连接来复制
不知道是不是我安装问题还是程序问题,请帮忙看下,谢谢!
每天过来几次看看更新没有,太期待了。
Using interface to rewrite upload method.
1,文档中的 手动安装 教程已经不能跟上时代了,如:路径不正确(原先的目录为:auxpi,现目录为auxpi/build/linux,请及时进行更新
2,项目中,用户头像无法正常加载,在用户中心中,用户上传的图片的缩略图无法加载,管理面板中也是如此,环境为宝塔,反代、Nginx配置已按照教程检查无误
3,网站Logo似乎不能使用ico格式?
4,API使用中的第一个参数(表单名称)是什么意思?我似乎不能理解
我个人不太常用这种聊天工具,所以如果有谁想建一个可以在下面留下你的群号,然后我加进去就可以了。感谢各位
--分割线--
有需要进去的朋友可以去这个群:599735428
发现360图床部分情况下获取链接失败直接把没有图片的开头链接存入了数据库
以及对大图压缩过度的问题https://ps.ssl.qhmsg.com/t017cc68c35e8d93a54.jpg
如默认单反手机相片等源文件普遍一张图几M,分辨率更是大的浪费,毕竟显示器分辨率有限,人肉眼范围也有限 ,有没有考虑加入图片压缩 剪裁 水印 缩小分辨率 等等实用功能? 处理后再分发保存
或者保存源文件情况下新增 压缩.水印功能的新图片
源文件也得到保存,压缩后的新图片也利于分发和调用访问
本地图床已关闭 但首页默认图床仍然显示为本地图床且上传图片会提示上传参数错误 请问如何自定义默认图床为一个指定项呢?版本为V2.3.3
新浪图床最近开启了防盗链,直接访问可以显示但是网站中引用就无法显示图片
经过测试后发现将ws3替换为tva1后即可正常使用
那么问题来了,数据库中的我换了
后面上传的图片怎么换啊大佬
使用./auxpi -mod=admin -name=hello -email=[email protected] -pass=123123123 命令时
/\ /\ /\ / / / _ \
//\/ / \ \ / / /)/ / //
/ _ \ _/ / / // /
_/ _/_//_/ ___/
🍭 A NEW API IMAGES STORE TOOL 🍭
2019/03/10 20:39:32.827 [A] [users.go:245] [Models Error]: record not found ===>[users.go:245]
[SUCCESS]:Create Admin SUCCESS
但是登陆就显示用户不存在或用户密码错误...
去看了下数据库发现user表中空白
大写扩展名无法上传 提示文件类型错误
希望作者弄个视频教程,文字安装有点乱。感谢!
1、运行一段时间后页面就报HTTP ERROR 500错误了
2、运行成功了就出现这个
Handler crashed with error can't find templatefile in the path:views/webUpload/box.tpl�[0m
2019/02/24 11:56:48.293 �[1;35m[C] [asm_amd64.s:522] /usr/local/Cellar/go/1.11/libexec/src/runtime/asm_amd64.s:522�[0m
2019/02/24 11:56:48.293 �[1;35m[C] [asm_amd64.s:522] /usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513�[0m
2019/02/24 11:56:48.293 �[1;35m[C] [asm_amd64.s:522] /Users/aimer/go/src/github.com/astaxie/beego/template.go:73�[0m
3、怎么重启软件都不行,只能重启服务器
环境用的宝塔,centos7.6 php7.2 MySQL 5.6
具体:
[root@cc ~]# cd auxpi
[root@cc auxpi]# ./auxpi migrate
`` is not officially supported, running under compatibility mode.
2019/05/01 20:49:10 &{ 0 false 0 {0xc0001be3c0} {{0 0} {} map[] 0} 0xc0000b4d10 0xfadfe0 0xc0001cda20 false}
2019/05/01 20:49:10 sql: unknown driver "" (forgotten import?)
2019/05/01 20:49:10 [info] replacing callback gorm:update_time_stamp from /Users/aimer/go/src/auxpi/models/models.go:69
2019/05/01 20:49:10 [info] replacing callback gorm:update_time_stamp from /Users/aimer/go/src/auxpi/models/models.go:70
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8908a6]
goroutine 1 [running]:
database/sql.(*DB).SetMaxIdleConns(0x0, 0xa)
/usr/local/Cellar/go/1.11/libexec/src/database/sql/sql.go:814 +0x26
auxpi/models.init.0()
/Users/aimer/go/src/auxpi/models/models.go:73 +0x72b
[root@cc auxpi]#
严格按照你的宝塔搭建教程来的,走到这一步就这样了,不知道啥原因,大佬帮看下
此问题可使用Screen解决(可用方案或许不止这一个)
首先安装 screen 如已安装可跳过
yum -y install screen
创建一个名为 auxpi 的 screen
screen -S auxpi
创建后在这里运行代码
./auxpi run
成功运行后关闭ssh即可
在这个screen里执行的程序,在断开程序后也不会被关闭。但若重启服务器,screen 会被关闭。需要重新手动开启。 若日后需要查看命令台的输出,可以输入如下指令进入screen
screen -R auxpi
.gitignore 屏蔽了所有的json文件导致前端的包版本管理文件丢失
无
无
https://ae01.alicdn.com/kf/UTB8WocrsL2JXKJkSanr7613lVXa7.png
也是头疼了。。。
配置:
BT,Nginx 1.15.9,PHP-5.6,phpMyAdmin 4.7
RT
能暴露下各个网站的上传接口以及data格式么?
在以后的更新中是否可以加入Docker安装方式。
作者大大,宝塔面板的教程有出了吗?
数据库配置正确
./auxpi migrate
命令执行后提示sql: database is closed
有QQ群或微信群吗?已经用自动化脚本在服务器安装了一个,主要想使用本地图床,但是本地图床记录没有入库,版本 2.0 dev
搜狗好像已经失效了,有时间限制,一过时间就 404..
功能很喜欢,但环境可能有点麻烦, 一个正常的 web 环境 linux 宝塔安装了 nginx php mysql 等环境不敢乱上这个源码的脚本搭环境,生怕 web 环境受到影响...
给个建议:
上传或 api 图片,服务器以 MD5 名称先保存到服务器本地备份,图片 MD5 记录到 mysql 里返回标准 url
http://test/MD5
后台选择本地,sina,smms 等任意一个返回图片地址
mysql 字段用 id,MD5,sinaurl,smmsurl,x1url,x2url,x3url 等等
流程:
图片上传服务器 - 服务器分发各大 api 平台 - 记录各大平台返回的图片地址到 mysql
后台指定开启本地图片或 sina 图床 - 访问 http://test/MD5 - 跳转本地或 sina 图片 url
好处:各大平台有备份,url 也都保存 mysql 了,唯一标识就是 MD5 码
只要你写文章时调用的是 http://test/MD5,不管你正在使用的是什么图床平台,一旦平台挂了直接选择其他平台 url,假如全部平台挂了还有最安全的本地图片来调用..
就是说图片平台挂,不影响你发布文章调用的图片 url,因为后台一换平台就又正常恢复了,,
试想一下如果不是 md5 方式保存 sql,你写文章时用的是 sina 平台的图片 url,就算你分发到各大平台,但 sina 平台挂了,你的文章不就要一个一个图片替换 url 吗? 这个工作量可是非常恐怖了,如果是采用 http://test/MD5 来中转,你就不用担心平台挂了要去文章里替换图片地址的问题....
如默认单反手机相片等源文件普遍一张图几M,分辨率更是大的浪费,毕竟显示器分辨率有限,人肉眼范围也有限 ,有没有考虑加入图片压缩 剪裁 水印 缩小分辨率 等等实用功能? 处理后再分发保存
或者保存源文件情况下新增 压缩.水印功能的新图片
源文件也得到保存,压缩后的新图片也利于分发和调用访问
$ bee run auxpi
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
2018/11/08 16:46:57 INFO ▶ 0001 Using 'auxpi' as 'appname'
2018/11/08 16:46:57 INFO ▶ 0002 Initializing watcher...
auxpiAll\all_easyjson.go:7:2: cannot find package "github.com/mailru/easyjson" i n any of:
先安装bee go get -u github.com/beego/bee https://beego.me/docs/intro/
go get -u github.com/mailru/easyjson 然后
$ bee run auxpi
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
2018/11/08 16:52:59 INFO ▶ 0001 Using 'auxpi' as 'appname'
2018/11/08 16:52:59 INFO ▶ 0002 Initializing watcher...
auxpi/auxpiAll/e
github.com/astaxie/beego/cache
auxpi/auxpiAll
auxpi/bootstrap
auxpi/controllers
auxpi/server
auxpi/utils
auxpi/controllers/upload
auxpi/controllers/api
auxpi/routers
# auxpi/routers
routers\commentsRouter_______go_src_auxpi_controllers.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:25:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:34:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:43:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers_upload.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:25:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:34:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:43:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers_upload.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers_upload.go:16:13: too many errors
2018/11/08 16:53:01 ERROR ▶ 0003 Failed to build the application: # auxpi/routers
routers\commentsRouter_______go_src_auxpi_controllers.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:25:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:34:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers.go:43:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_______go_src_auxpi_controllers_upload.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:25:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:34:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers.go:43:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers_upload.go:16:13: unknown field 'Filters' in struct literal of type beego.ControllerComments
routers\commentsRouter_controllers_upload.go:16:13: too many errors
routers文件夹下面除了router.go 全部删掉,然后执行 bee run auxpi
$ bee run auxpi
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
2018/11/08 19:53:08 INFO ▶ 0001 Using 'auxpi' as 'appname'
2018/11/08 19:53:08 INFO ▶ 0002 Initializing watcher...
auxpi/routers
auxpi
2018/11/08 19:53:25 SUCCESS ▶ 0003 Built Successfully!
2018/11/08 19:53:25 INFO ▶ 0004 Restarting 'auxpi.exe'...
2018/11/08 19:53:25 SUCCESS ▶ 0005 './auxpi.exe' is running...
2018/11/08 19:53:25.404 [I] [parser.go:96] generate router from comments
2018/11/08 19:53:25.407 [I] [parser.go:96] generate router from comments
2018/11/08 19:53:25.460 [I] [asm_amd64.s:1333] http server Running on http://:2333
浏览器打开localhost:2333
编译
$ GOOS=windows GOARCH=amd64 bee pack
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
2018/11/08 20:05:46 INFO ▶ 0001 Packaging application on 'C:\Users\go\src\AUXPI'...
2018/11/08 20:05:46 INFO ▶ 0002 Building application...
2018/11/08 20:05:46 INFO ▶ 0003 Using: GOOS=windows GOARCH=amd64
2018/11/08 20:05:57 SUCCESS ▶ 0004 Build Successful!
2018/11/08 20:05:57 INFO ▶ 0005 Writing to output: C:\Users\go\src\AUXPI\AUXPI.tar.gz
2018/11/08 20:05:57 INFO ▶ 0006 Excluding relpath prefix: .
2018/11/08 20:05:57 INFO ▶ 0007 Excluding relpath suffix: .go:.DS_Store:.tmp
2018/11/08 20:06:00 SUCCESS ▶ 0008 Application packed!
$ ls
auxpi.exe* auxpiAll/ conf/ LICENSE README.md static/ views/
auxpi.exe~* auxpiRun.log controllers/ main.go routers/ tests/
AUXPI.tar.gz bootstrap/ lastupdate.tmp models/ server/ utils/
$ ./auxpi.exe
2018/11/08 20:09:08.104 [I] [router.go:269] C:\Users\go\src\AUXPI\controllers\upload no changed
2018/11/08 20:09:08.105 [I] [router.go:269] C:\Users\go\src\AUXPI\controllers no changed
2018/11/08 20:09:08.153 [I] [asm_amd64.s:1333] http server Running on http://:2333
rt
发现360图床部分情况下获取链接失败直接把没有图片的开头链接存入了数据库
以及对大图压缩过度的问题https://ps.ssl.qhmsg.com/t017cc68c35e8d93a54.jpg
如题
很多时候并不是都必须使用post给api接口上传,能简化流程当然更简化!!
比如我在网上看到一张配图
正常操作一: 保存电脑,打开图床程序选择图片提交上传
正常操作二:采集网页获取文章图片保存下载,写代码post图片到api接口,接收返回url,替换图片地址,发布..
以上是最常用的情景都存在的效率问题:
保存下载- post到图床程序- 图床程序再post到平台接口,
其中的(保存下载- post到图床程序) 这两步可以说完全多余的,如果直接post或get图片地址到图床程序能完成就增加很多流量时间效率
比如直接访问:http://test/get?http://sina.cn/img.jpg
图床服务器直接获取get?参数的图片地址进行保存下载,分发平台
返回图床程序的图片URL..
这样的流程就省下:
保存下载再上传图床程序
或
采集文章保存图片时要下载后post到图床程序的步骤..
RT,首先感谢开发!
目前图片上传的目标路径均为公共图床,是否考虑在后期加入阿里、腾讯、七牛等私有云存储功能,配合V2的分发功能,在上传至公共图床时同时在后台私有云完成备份?
本地图床上传文件不能带中文吗?同一个文件,文件名带中文字符生成的url就是错的。无中文字符就可以打开
如图
https://upload.torfirefox.name/images/2019/04/29/Ezt12ac7XeqZ0QSD.jpg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.