2.7.5 dev
*2023-02-12 v2.7.5 dev - 更换检测最新版本方式 - API上传增加返回Token ID - 优化显示pull/141/head
parent
9fa176fd1b
commit
bef5eeb849
|
@ -21,21 +21,26 @@
|
|||
|
||||
## 特点
|
||||
|
||||
* [x] 支持API
|
||||
* [x] 支持仅登录后上传
|
||||
* [x] 支持设置图片质量
|
||||
* [x] 支持压缩图片大小
|
||||
* [x] 支持文字/图片水印
|
||||
* [x] 支持设置图片指定宽/高
|
||||
* [x] 支持上传图片转换为指定格式
|
||||
* [x] 支持限制最低宽度/高度上传
|
||||
* [x] 支持API
|
||||
* [x] 支持上传其他文件格式
|
||||
* [x] 在线管理图片
|
||||
* [x] 支持网站统计
|
||||
* [x] 支持设置广告
|
||||
* [x] 支持图片鉴黄
|
||||
* [x] 支持自定义代码
|
||||
* [x] 支持上传IP黑白名单
|
||||
* [x] 支持上传日志IP定位
|
||||
* [x] 支持限制日上传次数
|
||||
* [x] 支持创建仅上传用户
|
||||
* [x] 对于安装环境要求极低
|
||||
* [x] 对于服务器性能要求极低
|
||||
* [x] 更多功能支持请安装尝试···
|
||||
|
||||
## 界面演示
|
||||
|
|
|
@ -520,7 +520,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
<label>* 已开启上传压缩的不需重复压缩! </label><br />
|
||||
<label>* 如果页面长时间没有响应,表示正面正在压缩! </label><br />
|
||||
<label>* 两种压缩均为不可逆,并且非常占用硬件资源. </label><br />
|
||||
<button type="submit" class="btn btn-mini btn-primary">开始压缩</button>
|
||||
<button type="submit" class="btn btn-mini btn-success">开始压缩</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -571,7 +571,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
<div class="col-md-6">
|
||||
<h5 class="header-dividing">清理缓存 <small>已缓存: <?php echo getFileNumber(APP_ROOT . $config['path'] . 'cache/') . '文件 | 占用' . getDistUsed(getDirectorySize(APP_ROOT . $config['path'] . 'cache/')); ?></small></h5>
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<button type="submit" class="btn btn-primary" name="delDir" value="cache/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
|
||||
<button type="submit" class="btn btn-success" name="delDir" value="cache/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
@ -908,7 +908,8 @@ if (isset($_POST['del_version_file'])) {
|
|||
<p class="text-ellipsis">Web服务: <?PHP echo $_SERVER['SERVER_SOFTWARE']; ?></p>
|
||||
<p class="text-ellipsis">服务器IP: <?PHP echo $_SERVER["SERVER_ADDR"] ?></p>
|
||||
<p class="text-ellipsis">系统时间: <?PHP echo date("Y-m-d H:i:s"); ?></p>
|
||||
<p class="text-ellipsis">占用内存: <?php echo getDistUsed(memory_get_usage()); ?></p>
|
||||
<p class="text-ellipsis"><span class="label label-dot label-success" data-toggle="tooltip" title="当前页面占用内存"></span> 页面占用: <?php echo getDistUsed(memory_get_usage()); ?></p>
|
||||
<p class="text-ellipsis"><span class="label label-dot label-danger" data-toggle="tooltip" title="本页面占用内存最高峰"></span> 占用峰值: <?php echo getDistUsed(memory_get_peak_usage()); ?></p>
|
||||
<p class="text-ellipsis">占用磁盘: <?php echo getDistUsed(disk_total_space(__DIR__) - disk_free_space(__DIR__)) ?></p>
|
||||
<p class="text-ellipsis">剩余磁盘: <?php echo getDistUsed(disk_free_space(__DIR__)); ?></p>
|
||||
<h5>PHP信息</h5>
|
||||
|
@ -919,7 +920,8 @@ if (isset($_POST['del_version_file'])) {
|
|||
<p class="text-ellipsis">运行时间限制: <?PHP echo get_cfg_var("max_execution_time") . "s"; ?></p>
|
||||
<p class="text-ellipsis">最大占用内存: <?PHP echo get_cfg_var("memory_limit"); ?></p>
|
||||
<p class="text-ellipsis">POST上传限制: <?php echo ini_get('post_max_size'); ?></p>
|
||||
<p class="text-ellipsis">GD版本: <?php echo (gd_info()["GD Version"]); ?></p>
|
||||
<p class="text-ellipsis">GD版本: <?php echo (gd_info()["GD Version"]); ?>
|
||||
</p>
|
||||
<h5>我的信息</h5>
|
||||
<hr />
|
||||
<p class="text-ellipsis">IP: <?php echo real_ip(); ?></p>
|
||||
|
@ -1110,7 +1112,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<input type="hidden" name="admin_form" value="" placeholder="隐藏的保存">
|
||||
<button type="submit" class="btn btn-danger">更改管理员 账号|密码</button>
|
||||
<button type="submit" class="btn btn-primary">更改管理员 账号|密码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-primary with-icon col-xs-8">
|
||||
|
@ -1128,7 +1130,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
</form>
|
||||
<!-- 上传用户管理 start-->
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post" onsubmit="return uploader_md5_post()">
|
||||
<h5 class="header-dividing">上传者账号 <small>只能用于上传</small></h5>
|
||||
<h5 class="header-dividing">上传者账号<small> 账户只能用于上传</small></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group col-md-3">
|
||||
<div class="input-control has-icon-left" data-toggle="tooltip" title="上传者账号只能上传不能操作其他项目">
|
||||
|
|
|
@ -1 +1 @@
|
|||
2.7.4
|
||||
2.7.5
|
|
@ -170,6 +170,7 @@ if ($handle->uploaded) {
|
|||
"srcName" => $handle->file_src_name_body,
|
||||
"thumb" => $handleThumb,
|
||||
"del" => $delUrl,
|
||||
"ID" => $tokenID, // 202-02-11 增加返回Token ID
|
||||
);
|
||||
echo json_encode($reJson, JSON_UNESCAPED_UNICODE);
|
||||
$handle->clean();
|
||||
|
@ -179,6 +180,7 @@ if ($handle->uploaded) {
|
|||
"result" => "failed",
|
||||
"code" => 206,
|
||||
"message" => $handle->error,
|
||||
"memory" => getDistUsed(memory_get_usage()), //内存使用率 2023-02-11
|
||||
// 'log' => $handle->log,(仅用作调试用)
|
||||
);
|
||||
unset($handle);
|
||||
|
|
|
@ -5,7 +5,7 @@ if (!is_file(APP_ROOT . '/config/install.lock') and is_file(APP_ROOT . '/install
|
|||
exit('<script type="text/javascript">window.location.href="' . get_whole_url('/') . '/install/index.php"</script>');
|
||||
}
|
||||
/** 检测弹窗 */
|
||||
if (file_exists(APP_ROOT . '/config/EasyIamge.lock')) return; // 查询锁定弹窗文件是否存在
|
||||
if (is_file(APP_ROOT . '/config/EasyIamge.lock')) return; // 查询锁定弹窗文件是否存在
|
||||
file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定文件,如需再次展示请删除此文件!', FILE_APPEND | LOCK_EX);
|
||||
?>
|
||||
<div class="modal fade" id="myModal-1">
|
||||
|
@ -13,55 +13,65 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">
|
||||
<i class="icon icon-heart"> </i><a href="https://blog.png.cm/902.html" target="_blank">简单图床-EasyImage2.0</a> 安装环境检测
|
||||
<i class="icon icon-heart"> </i><a href="https://github.com/icret/EasyImages2.0" target="_blank">简单图床-EasyImage2.0</a> 安装环境检测
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4>说明:</h4>
|
||||
<h5>1. 建议使用<span style="color:red">PHP7.0</span>及以上版本;</h5>
|
||||
<h5>2. 上传失败大部分是由于<span style="color:red">upload_max_filesize、post_max_size、文件权限</span>设置不正确;</h5>
|
||||
<h5>3. 本程序主要用到<span style="color:red">Fileinfo、GD、Openssl</span>扩展,如果缺失会导致无法访问管理面板以及上传/删除图片。</h5>
|
||||
<h5>1. 建议使用<span class="text-red">PHP7.0</span>及以上版本;</h5>
|
||||
<h5>2. 上传失败大部分是由于<span class="text-red">upload_max_filesize、post_max_size、文件权限</span>设置不正确;</h5>
|
||||
<h5>3. 主要用到<span class="text-red">Fileinfo、GD、Openssl</span>扩展,如果缺失会导致无法访问管理面板以及上传/删除图片。</h5>
|
||||
<hr />
|
||||
<h4>EasyImage2.0 基础检测:</h4>
|
||||
<p>当前PHP版本:<sapn style="color:green"><?php echo phpversion() ?></sapn>
|
||||
<p>当前PHP版本:<sapn class="text-green"><?php echo phpversion() ?></sapn>
|
||||
</p>
|
||||
<p>PHP最大上传: <sapn style="color:green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
|
||||
<p>PHP最大上传: <sapn class="text-green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
|
||||
</p>
|
||||
<p>POST最大上传: <sapn style="color:green"><?php echo ini_get('post_max_size'); ?></sapn>
|
||||
<p>POST最大上传: <sapn class="text-green"><?php echo ini_get('post_max_size'); ?></sapn>
|
||||
</p>
|
||||
<?php
|
||||
// 扩展检测 取消检测imagick扩展
|
||||
$expand = array('fileinfo', 'gd', 'openssl');
|
||||
$expand = array('fileinfo', 'openssl', 'gd');
|
||||
foreach ($expand as $val) {
|
||||
if (extension_loaded($val)) {
|
||||
echo '
|
||||
<p style="color:green">' . strtoupper($val) . " - 已安装</p>";
|
||||
echo "<p class='text-green'> $val - 已安装</p>";
|
||||
} else {
|
||||
echo "<script language='javascript'>alert('$val - 未安装')</script>";
|
||||
echo '<p style="color:red">' . strtoupper($val) . " - 未安装</p>";
|
||||
echo "<script language='javascript'>alert($val - 未安装)</script>";
|
||||
echo "<p class='text-red'> $val- 未安装</p>";
|
||||
}
|
||||
}
|
||||
// 文件权限检测
|
||||
$quanxian = substr(base_convert(fileperms(APP_ROOT . "/application/upload.php"), 10, 8), 3);
|
||||
if (IS_WIN) {
|
||||
echo '
|
||||
<p style="color:green">upload.php 文件可执行</p>
|
||||
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
|
||||
<p class="text-green">upload.php 文件可执行</p>
|
||||
<p class="text-green">' . $config['path'] . ' 目录可读写</p>
|
||||
';
|
||||
}
|
||||
if (!IS_WIN) {
|
||||
if ($quanxian !== '755' and !is_writable(APP_ROOT . $config['path'])) {
|
||||
echo '
|
||||
<p style="color:red">upload.php 文件不可执行</font>>
|
||||
<p style="color:red">' . $config['path'] . ' 目录可读写</font>>
|
||||
<p class="text-red">upload.php 文件不可执行</font>>
|
||||
<p class="text-red">' . $config['path'] . ' 目录可读写</font>>
|
||||
';
|
||||
} else {
|
||||
echo '
|
||||
<p style="color:green">upload.php 文件可执行</p>
|
||||
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
|
||||
<p class="text-green">upload.php 文件可执行</p>
|
||||
<p class="text-green">' . $config['path'] . ' 目录可读写</p>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
echo '<p class="text-green">当前支持图片格式:';
|
||||
foreach (gd_info() as $k => $v) {
|
||||
$k = str_ireplace(array('Support', 'Create', 'Read', 'Linkage', 'GD Version', 'FreeType', 'Font', 'JIS-mapped', 'Japanese'), '', $k);
|
||||
if ($v) {
|
||||
printf("%s", $k);
|
||||
} else {
|
||||
printf("%s", $k);
|
||||
}
|
||||
}
|
||||
echo '</p>';
|
||||
?>
|
||||
</div>
|
||||
<div class="modal-footer" style="text-align:left">
|
||||
|
|
|
@ -3,25 +3,45 @@
|
|||
/**
|
||||
* @author Icret
|
||||
* 获取GitHub最新版本号
|
||||
* 简单图床 EasyImage2.0 2021-5-10 14:17:25
|
||||
* EasyImage2.0 简单图床 创建时间: 2021-5-10 14:17:25
|
||||
* 修改时间: 2023-02-10 11:23:30
|
||||
* @param int 864000 10天的unix时间,既每隔十天获取一次版本
|
||||
*/
|
||||
|
||||
error_reporting(0); // 关闭所有PHP错误报告
|
||||
|
||||
class getVersion
|
||||
{
|
||||
private $url;
|
||||
private $dir; //文件所在文件夹
|
||||
private $filePath; //文件绝对路径
|
||||
private $fileName; //文件名称
|
||||
private $fileModifiTime; // 文件最后修改时间
|
||||
private $time; // 当前时间
|
||||
|
||||
public function __construct($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
$this->dir = __DIR__ . '/../admin/logs/version/';
|
||||
$this->fileName = 'version.json';
|
||||
$this->filePath = $this->dir . $this->fileName;
|
||||
$this->fileModifiTime = filemtime($this->filePath);
|
||||
$this->time = time();
|
||||
}
|
||||
|
||||
public function readJson($name = 'tag_name')
|
||||
{
|
||||
if (file_exists(__DIR__ . '/../admin/logs/version/version.json')) {
|
||||
$file = fopen(__DIR__ . '/../admin/logs/version/version.json', 'r');
|
||||
$test = fread($file, filesize(__DIR__ . '/../admin/logs/version/version.json'));
|
||||
$version = json_decode($test, true);
|
||||
return $version[$name];
|
||||
fclose($file);
|
||||
if (is_file($this->filePath)) {
|
||||
|
||||
if ($this->time - $this->fileModifiTime > 864000) {
|
||||
$this->downJson();
|
||||
} else {
|
||||
$file = fopen($this->filePath, 'r');
|
||||
$test = fread($file, filesize($this->filePath));
|
||||
$version = json_decode($test, true);
|
||||
return $version[$name];
|
||||
fclose($file);
|
||||
}
|
||||
} else {
|
||||
$this->downJson();
|
||||
}
|
||||
|
@ -30,13 +50,13 @@ class getVersion
|
|||
public function downJson()
|
||||
{
|
||||
|
||||
if (!is_dir(__DIR__ . '/../admin/logs/version/')) {
|
||||
mkdir(__DIR__ . '/../admin/logs/version/', 0755, true);
|
||||
if (!is_dir($this->dir)) {
|
||||
mkdir($this->dir, 0755, true);
|
||||
}
|
||||
|
||||
$version = $this->geturl($this->url);
|
||||
$version = json_decode($version, true);
|
||||
$file = fopen(__DIR__ . '/../admin/logs/version/version.json', 'w+');
|
||||
$file = fopen($this->filePath, 'w+');
|
||||
fwrite($file, $version);
|
||||
fclose($file);
|
||||
}
|
||||
|
|
|
@ -191,7 +191,6 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
|
|||
hide: 0.5
|
||||
}
|
||||
});
|
||||
|
||||
// console
|
||||
console.log("%cEasyImage<?php echo get_current_version(); ?>", "background: rgba(252,234,187,1);background: -moz-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%,rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -webkit-gradient(left top, right top, color-stop(0%, rgba(252,234,187,1)), color-stop(12%, rgba(175,250,77,1)), color-stop(28%, rgba(0,247,49,1)), color-stop(39%, rgba(0,210,247,1)), color-stop(51%, rgba(0,189,247,1)), color-stop(64%, rgba(133,108,217,1)), color-stop(78%, rgba(177,0,247,1)), color-stop(87%, rgba(247,0,189,1)), color-stop(0.5%, rgba(245,22,52,1)));background: -webkit-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -o-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -ms-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: linear-gradient(to right, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#f51634', GradientType=1 );font-size:2.34em;font-weight:bold")
|
||||
console.log('%c图床作者及演示网站: https://png.cm\n作为开发者你可以对相应的后台功能进行扩展(增删改相应代码), 但请保留代码中相关来源信息(例如: 本人博客, 邮箱等);\n本程序由 Icret 独自开发并完全开源, 碰到收费发布的请不要轻易付款; 本人仅为程序开源创作, 如非法网站使用与本人无关, 请勿用于非法用途.%c ', 'color: #eaad1a; padding:5px 0; border:1px solid #448ef6; font-size:12px;', '');
|
||||
|
|
|
@ -35,7 +35,6 @@ define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0);
|
|||
|
||||
/*---------------基础配置结束-------------------*/
|
||||
|
||||
|
||||
require_once APP_ROOT . '/config/config.php';
|
||||
require_once APP_ROOT . '/config/config.guest.php';
|
||||
require_once __DIR__ . '/WaterMask.php';
|
||||
|
@ -855,29 +854,16 @@ function getVersion($name = 'tag_name')
|
|||
if ($config['checkEnv']) {
|
||||
|
||||
require_once APP_ROOT . '/application/class.version.php';
|
||||
// 获取版本地址
|
||||
$url = "https://api.github.com/repositories/188228357/releases/latest";
|
||||
$url = "https://api.github.com/repositories/188228357/releases/latest"; // 获取版本地址
|
||||
$getVersion = new getVersion($url);
|
||||
|
||||
$now = date('dH'); // 当前日期时间
|
||||
$get_ver_day = array('1006', '2501'); // 检测日期的时间
|
||||
|
||||
foreach ($get_ver_day as $day) {
|
||||
if (empty($getVersion->readJson($name))) { // 不存在就下载
|
||||
$getVersion->downJson();
|
||||
} else if ($day == $now) { // 是否在需要更新的日期
|
||||
$getVersion->downJson();
|
||||
/*
|
||||
} elseif ($config['version'] == $getVersion->readJson()) { // 版本相同不提示
|
||||
return null;
|
||||
*/
|
||||
} else { // 返回版本
|
||||
return $getVersion->readJson($name);
|
||||
}
|
||||
if (!empty($getVersion->readJson($name))) {
|
||||
return $getVersion->readJson($name); // 返回版本信息
|
||||
} else {
|
||||
$getVersion->downJson(); // 获取版本信息
|
||||
return '获取版本文件失败,请检查curl或者网络';
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -199,6 +199,7 @@ if ($handle->uploaded) {
|
|||
"result" => "failed",
|
||||
"code" => 206,
|
||||
"message" => $handle->error,
|
||||
"memory" => getDistUsed(memory_get_usage()), //内存使用率 2023-02-11
|
||||
// 'log' => $handle->log,(仅用作调试用)
|
||||
);
|
||||
unset($handle);
|
||||
|
|
|
@ -137,7 +137,7 @@ try {
|
|||
orgin: '<?php echo $k; ?>',
|
||||
source: '<input class="form-control input-sm" type="text" value="<?php echo $v['source']; ?>" readonly>',
|
||||
date: '<?php echo $v['date']; ?>',
|
||||
ip: '<a href="http://ip.tool.chinaz.com/<?php echo $v['ip']; ?>" target="_blank"><?php echo $v['ip'] . ':' . $v['port']; ?></a>', // 备用IP查询: https://www.ip138.com/iplookup.asp?ip=
|
||||
ip: '<a href="http://freeapi.ipip.net/<?php echo $v['ip']; ?>" target="_blank"><?php echo $v['ip'] . ':' . $v['port']; ?></a>', // 备用IP查询: https://www.ip138.com/iplookup.asp?ip= http://ip.tool.chinaz.com/$ip
|
||||
ip2region: '<?php echo ip2region($v['ip']); ?>',
|
||||
user_agent: '<input class="form-control input-sm" type="text" value="<?php echo $v['user_agent']; ?>" readonly>',
|
||||
path: '<input class="form-control input-sm" type="text" value="<?php echo $v['path']; ?>" readonly>',
|
||||
|
|
|
@ -16,7 +16,7 @@ $config=Array
|
|||
<h5>本人仅为程序开源创作,如遇非法网站使用与本人无关,请勿用于商业用途;</h5>
|
||||
<h5>作为开发者你可以对相应的后台功能进行扩展(增删改相应代码),但请保留代码中源作者信息。</h5>
|
||||
<a href="https://png.cm/?admin.inc" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-external-link"></i> 演示</button></a>
|
||||
<a href="https://icret.github.io/EasyImages2.0/#/" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-book"></i> 手册</button></a>
|
||||
<a href="https://icret.gitee.io/easyimages2.0/#/" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-book"></i> 手册</button></a>
|
||||
<a href="https://github.com/icret/EasyImages2.0/discussions" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-comments-alt"></i> 社区</button></a>
|
||||
<a href="https://t.me/Easy_Image" target="_blank" data-toggle="tooltip" title="EasyImage Telegram Group"><button type="button" class="btn btn-mini"><i class="icon icon-plane"></i> Telegram</button></a>
|
||||
<span data-toggle="tooltip" title="您的赞美是我开发的动力!"><button type="button" class="btn btn-mini btn-primary" data-toggle="modal" data-moveable="true" data-size="sm" data-icon="heart" data-title="您的赞美是我开发的动力!" data-custom="<ul class=\'nav nav-tabs\'><li class=\'active\'><a data-tab href=\'#wechat\'><i class=\'icon icon-wechat\' style=\'color:#329d38;\'> 微信</i></a></li><li><a data-tab href=\'#alipay\'><i class=\'icon icon-zhifubao-square\' style=\'color:#1970fc;\'> 支付宝</i></a></li></ul><div class=\'tab-content\'><div class=\'tab-pane active\' id=\'wechat\'><img src=\'../public/images/wechat.jpg\'></div><div class=\'tab-pane\' id=\'alipay\'><img src=\'../public/images/alipay.jpg\'></div></div>"><i class="icon icon-yen"></i>打赏作者</button></span>
|
||||
|
@ -41,7 +41,7 @@ $config=Array
|
|||
'textSize'=>50,
|
||||
'textFont'=>'/public/static/pang_men_zheng_dao_biao_ti_ti_3.0.ttf',
|
||||
'waterImg'=>'/public/images/watermark.png',
|
||||
'extensions'=>'gif,jpeg,png,tif,bmp,svg,webp,jpg,tga,ico',
|
||||
'extensions'=>'gif,jpeg,png,tif,bmp,svg,webp,jpg,tga,ico,avif',
|
||||
'compress'=>0,
|
||||
'compress_ratio'=>80,
|
||||
'thumbnail'=>1,
|
||||
|
@ -114,7 +114,7 @@ $config=Array
|
|||
'guest_path_status'=>0,
|
||||
'token_path_status'=>0,
|
||||
'admin_path'=>'u',
|
||||
'update'=>'2023-02-07 01:23:45',
|
||||
'update'=>'2023-02-11 22:41:27',
|
||||
'footer'=>'<a href="https://github.com/icret/EasyImages2.0" target="_blank" rel="nofollow" data-toggle="tooltip" title="Since 2018 - Github">© Since 2018</a>
|
||||
<a href="https://png.cm/" target="_blank" data-toggle="tooltip" title="EasyImage 简单图床">EasyImage</a>
|
||||
<a href="/admin/terms.php" target="_blank" data-toggle="tooltip" title="使用协议">DMCA</a>
|
||||
|
|
|
@ -21,21 +21,26 @@
|
|||
|
||||
## 特点
|
||||
|
||||
* [x] 支持API
|
||||
* [x] 支持仅登录后上传
|
||||
* [x] 支持设置图片质量
|
||||
* [x] 支持压缩图片大小
|
||||
* [x] 支持文字/图片水印
|
||||
* [x] 支持设置图片指定宽/高
|
||||
* [x] 支持上传图片转换为指定格式
|
||||
* [x] 支持限制最低宽度/高度上传
|
||||
* [x] 支持API
|
||||
* [x] 支持上传其他文件格式
|
||||
* [x] 在线管理图片
|
||||
* [x] 支持网站统计
|
||||
* [x] 支持设置广告
|
||||
* [x] 支持图片鉴黄
|
||||
* [x] 支持自定义代码
|
||||
* [x] 支持上传IP黑白名单
|
||||
* [x] 支持上传日志IP定位
|
||||
* [x] 支持限制日上传次数
|
||||
* [x] 支持创建仅上传用户
|
||||
* [x] 对于安装环境要求极低
|
||||
* [x] 对于服务器性能要求极低
|
||||
* [x] 更多功能支持请安装尝试···
|
||||
|
||||
## 界面演示
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
* [鉴黄](./鉴黄.md)
|
||||
* [公共查询](./公共查询.md)
|
||||
* [分离相关](./分离相关.md)
|
||||
* [其他格式](./其他格式.md)
|
||||
* [Edge插件](./Edge插件.md)
|
||||
* [Chrome插件](./Chrome插件.md)
|
||||
* [使用PicGo上传](./使用PicGo上传.md)
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
var footer = [
|
||||
'<hr/>',
|
||||
'<footer>',
|
||||
'<span>Copyright © 2018 <a href="https://github.com/icret/EasyImages2.0" target="_blank">EasyImage</a> Developer By <a href="https://github.com/icret" target="_blank">Icret</a>.</span>',
|
||||
'<span>Copyright ©Since 2018 <a href="https://github.com/icret/EasyImages2.0" target="_blank">EasyImage</a> Develop By <a href="https://github.com/icret" target="_blank">Icret</a>, Docs By <a href="https://docsify.js.org/#/zh-cn/" target="_blank">Docsify</a>.</span>',
|
||||
'</footer>'
|
||||
].join('');
|
||||
|
||||
|
@ -54,14 +54,23 @@
|
|||
return html + footer;
|
||||
});
|
||||
},
|
||||
|
||||
function (hook, vm) {
|
||||
hook.beforeEach(function (html) {
|
||||
var url = 'https://github.com/icret/EasyImages2.0/blob/master/docs/' + vm.route.file;
|
||||
var editHtml = '<a href="' + url + '" target="_blank">📝 在GitHub上编辑</a>';
|
||||
|
||||
return (html + '<br/><br/><br/><br/><br/>' + editHtml);
|
||||
});
|
||||
}
|
||||
]
|
||||
}
|
||||
// 离线模式
|
||||
// 离线阅读
|
||||
if (typeof navigator.serviceWorker !== 'undefined') {
|
||||
navigator.serviceWorker.register('sw.js')
|
||||
navigator.serviceWorker.register('sw.js');
|
||||
}
|
||||
|
||||
console.log(window.Docsify.version)
|
||||
console.log(window.Docsify.version);
|
||||
</script>
|
||||
<!-- docsify的js依赖 -->
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/docsify/4.13.0/docsify.min.js"></script>
|
||||
|
@ -73,8 +82,6 @@
|
|||
<script src="//fastly.jsdelivr.net/npm/docsify-copy-code"></script>
|
||||
<!-- 代码高亮 -->
|
||||
<script src="//fastly.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
|
||||
<!-- emoji -->
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/docsify/4.13.0/plugins/emoji.min.js"></script>
|
||||
<!-- 外链脚本 -->
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/docsify/4.13.0/plugins/external-script.min.js"></script>
|
||||
<!-- 字数统计 -->
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
![项目状态](https://repobeats.axiom.co/api/embed/0922803f14091f0686de26fee5196b9984b106a4.svg "Repobeats analytics image")
|
||||
|
||||
*2023-02-12 v2.7.5 dev
|
||||
- 更换检测最新版本方式
|
||||
- API上传增加返回Token ID
|
||||
- 优化显示
|
||||
|
||||
* 2023-02-06 v2.7.4
|
||||
- 优化和修复bugs
|
||||
- 使用docsify自建文档 地址 [Gitee](https://icret.gitee.io/easyimages2.0/#/) | [Gihub](https://icret.github.io/EasyImages2.0/#/) 或下载源码后直接访问`/docs/`
|
||||
- 使用[docsify](https://docsify.js.org/#/zh-cn/)自建文档 地址 [Gitee](https://icret.gitee.io/easyimages2.0/#/) | [Gihub](https://icret.github.io/EasyImages2.0/#/) 或下载源码后直接访问`/docs/`
|
||||
|
||||
* 2023-02-05 v2.7.3
|
||||
- 修复设置中手动压缩失败!
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
- 如果你想上传其他的格式,比如`MP4` `pdf` `mp3` 可以这样操作
|
||||
|
||||
1. 在后台上传设置中添加对应的格式
|
||||
2. 在图床安全中关闭图床模式
|
||||
- 这样你就可以上传任意格式文件了
|
||||
- 友情提示, 不要上传一些可执行文件 比如:`php` `sh`等危险文件
|
Loading…
Reference in New Issue