mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-01-08 11:58:03 +08:00
uPic
This commit is contained in:
parent
1583eec072
commit
9e2a513ebb
@ -12,6 +12,8 @@ header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Credentials: true");
|
||||
header("Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE");
|
||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");
|
||||
// 定义返回头信息为Json
|
||||
header("Content-type: application/json; charset=utf-8");
|
||||
|
||||
// 无文件
|
||||
if (empty($_FILES['image'])) {
|
||||
@ -125,8 +127,6 @@ if ($handle->uploaded) {
|
||||
|
||||
// 图片完整相对路径:/i/2021/05/03/k88e7p.jpg
|
||||
if ($handle->processed) {
|
||||
header('Content-type:text/json');
|
||||
|
||||
// 图片相对路径
|
||||
$pathIMG = $Img_path . $handle->file_dst_name;
|
||||
// 图片访问网址
|
||||
@ -174,6 +174,7 @@ if ($handle->uploaded) {
|
||||
"thumb" => $handleThumb,
|
||||
"del" => $delUrl,
|
||||
"ID" => $tokenID, // 202-02-11 增加返回Token ID
|
||||
"messge" => "success",
|
||||
// "memory" => getDistUsed(memory_get_peak_usage()), // 占用内存 2023-02-12
|
||||
);
|
||||
echo json_encode($reJson, JSON_UNESCAPED_UNICODE);
|
||||
@ -188,7 +189,6 @@ if ($handle->uploaded) {
|
||||
// 'log' => $handle->log, // 仅用作调试用
|
||||
);
|
||||
unset($handle);
|
||||
header('Content-Type:application/json; charset=utf-8');
|
||||
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
|
||||
|
24
docs/SUMMARY.md
Normal file
24
docs/SUMMARY.md
Normal file
@ -0,0 +1,24 @@
|
||||
* [简介](简介.md)
|
||||
* [安装扩展](安装扩展.md)
|
||||
* [安装图床](安装图床.md)
|
||||
* [三方安装指南](三方安装指南.md)
|
||||
* [跳过安装引导](跳过安装引导.md)
|
||||
* [安全配置](安全配置.md)
|
||||
* [后台管理](后台管理.md)
|
||||
* [API](API.md)
|
||||
* [鉴黄](鉴黄.md)
|
||||
* [公共查询](公共查询.md)
|
||||
* [分离相关](分离相关.md1)
|
||||
* [Edge插件](Edge插件.md)
|
||||
* [Chrome插件](Chrome插件.md)
|
||||
* [使用uPic上传](使用uPic上传.md)
|
||||
* [使用PicGo上传](使用PicGo上传.md)
|
||||
* [使用ShareX上传](使用ShareX上传.md)
|
||||
* [苹果快捷指令上传](苹果快捷指令上传.md)
|
||||
* [隐藏存储路径](隐藏存储路径.md)
|
||||
* [图床更新升级](图床更新升级.md)
|
||||
* [更改域名/服务器](更改域名/服务器.md)
|
||||
* [常见问题与环境要求](常见问题与环境要求.md)
|
||||
* [打赏开发者](打赏开发者.md)
|
||||
* [更新日志](更新日志.md)
|
||||
* [许可证](许可证.md)
|
@ -14,6 +14,7 @@
|
||||
* [其他格式](./其他格式.md)
|
||||
* [Edge插件](./Edge插件.md)
|
||||
* [Chrome插件](./Chrome插件.md)
|
||||
* [使用uPic上传](./使用uPic上传.md)
|
||||
* [使用PicGo上传](./使用PicGo上传.md)
|
||||
* [使用ShareX上传](./使用ShareX上传.md)
|
||||
* [苹果快捷指令上传](./苹果快捷指令上传.md)
|
||||
|
BIN
docs/images/uPic.avif
Normal file
BIN
docs/images/uPic.avif
Normal file
Binary file not shown.
BIN
docs/images/uPic1.avif
Normal file
BIN
docs/images/uPic1.avif
Normal file
Binary file not shown.
@ -1,3 +1,6 @@
|
||||
* 2023-04-23 v2.8.2
|
||||
- 增加uPic教程
|
||||
|
||||
* 2023-04-12 v2.8.1
|
||||
- 修改上传签名生成方式
|
||||
- 修复一处绕过代码
|
||||
|
21
docs/使用uPic上传.md
Normal file
21
docs/使用uPic上传.md
Normal file
@ -0,0 +1,21 @@
|
||||
1. 下载并安装[uPic releases][1]或者[Mac App Store][2] | [App Store][3](测试版本:uPic v0.21.1)
|
||||
2. 创建自定义图床并按照截图填写
|
||||
3. 返回uPic主菜单栏, 选择默认上传为自定义图床
|
||||
|
||||
![EasyImage简单图床使用uPic上传图片](images/uPic1.avif)
|
||||
|
||||
![EasyImage简单图床使用uPic上传图片](images/uPic.avif)
|
||||
|
||||
```uPic
|
||||
API地址:https://png.cm/api/index.php // 输入你网站api地址
|
||||
请求方式: POST
|
||||
文件字段名: image
|
||||
添加其他字段:
|
||||
- 增加Header字段: content-type multipart/form-data
|
||||
- 增加Body字段: token 1c17b11693cb5ec63859b091c5b9c1b2 // 使用你的token
|
||||
url路径: ["url"]
|
||||
```
|
||||
|
||||
[1]: https://github.com/gee1k/uPic/releases
|
||||
[2]: https://apps.apple.com/cn/app/id1549159979
|
||||
[3]: https://apps.apple.com/us/app/id1510718678
|
@ -5,9 +5,9 @@
|
||||
4. 如果出现错误请在设置中把所有底部设置点击一次`保存`
|
||||
|
||||
##### docker升级
|
||||
1. 删除容器,镜像
|
||||
2. 保留挂载在主机上的配置文件
|
||||
3. 重新执行一边安装代码
|
||||
1. 删除容器、镜像
|
||||
2. 保留挂载在主机上的配置文件和上传文件夹
|
||||
3. 重新执行一边docker安装代码
|
||||
|
||||
##### 更新后显示当前版本与Github版本不一致?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user