You've already forked EasyImages2.0
mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-12-13 11:43:58 +08:00
v2.6.0
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Verot\Upload;
|
||||
|
||||
require_once __DIR__ . '/../application/function.php';
|
||||
require_once APP_ROOT . '/application/class.upload.php';
|
||||
require_once APP_ROOT . '/config/api_key.php';
|
||||
@@ -38,7 +41,7 @@ if ($handle->uploaded) {
|
||||
// 允许上传的mime类型
|
||||
$handle->allowed = array('image/*');
|
||||
// 文件命名
|
||||
$handle->file_new_name_body = imgName($handle->file_src_name_body) . '_' . $tokenID;
|
||||
$handle->file_new_name_body = imgName($handle->file_src_name_body) . '-' . $tokenID;
|
||||
// 最大上传限制
|
||||
$handle->file_max_sizes = $config['maxSize'];
|
||||
// 最大宽度
|
||||
@@ -67,8 +70,8 @@ if ($handle->uploaded) {
|
||||
$pathIMG = config_path() . $handle->file_dst_name;
|
||||
$imageUrl = $config['imgurl'] . $pathIMG;
|
||||
|
||||
// 原图保护 key值是由crc32加密的登录密码
|
||||
$hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['password'])) : $imageUrl;
|
||||
// 原图保护 key值是由crc32加密的hide_key
|
||||
$hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key'])) : $imageUrl;
|
||||
|
||||
// 关闭上传后显示加密删除链接
|
||||
if ($config['show_user_hash_del']) {
|
||||
|
||||
Reference in New Issue
Block a user