mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43cfc832a8 | ||
|
|
6df3267b18 | ||
|
|
b0562203c2 | ||
|
|
995582f7c6 | ||
|
|
e347ec2367 | ||
|
|
ffcd4dbf40 | ||
|
|
6ee1673d83 | ||
|
|
7b0db6fe16 |
@@ -1,6 +1,7 @@
|
||||
# Hellohao图像托管程序 - 也许这会是最优秀的图床程序
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||

|
||||

|
||||
@@ -23,11 +24,10 @@
|
||||
Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,`U-File`,`FTP`,`Backblaze(B2)`,`百度云BOS`,`青云Qingstor`,`Ucloud US3`,`Minio`,`AWS S3`
|
||||
|
||||
|
||||
### 更新日志 `20211229`
|
||||
### 更新日志 `20220216`
|
||||
|
||||
- **紧急修复** 修复部分环境下,多个存储源对接后无法使用的问题。
|
||||
|
||||
- [x] 优化上传图片的响应头和返回值判断逻辑
|
||||
- [x] 后台菜单添加返回首页项
|
||||
- [x] 优化了页面组件显示问题
|
||||
|
||||
### 引导
|
||||
|
||||
@@ -39,21 +39,21 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
|
||||
开源版编译包下载: [下载开源版程序包](https://github.com/Hello-hao/Tbed/releases/)
|
||||
|
||||
官网(含Core版):[http://Tbed.wwery.com](http://Tbed.wwery.com)
|
||||
官网(含Core版):[https://tbed.hellohao.cn](https://tbed.hellohao.cn)
|
||||
|
||||
前端源码:[https://github.com/Hello-hao/tbed-web](https://github.com/Hello-hao/tbed-web)
|
||||
|
||||
文档地址:[http://doc.hellohao.cn](http://doc.hellohao.cn)
|
||||
文档地址:[https://doc.hellohao.cn](https://doc.hellohao.cn)
|
||||
|
||||
程序展示:[http://tc.hellohao.cn](http://tc.hellohao.cn)
|
||||
程序展示:[https://tc.hellohao.cn](https://tc.hellohao.cn)
|
||||
|
||||
作者博客:[http://www.hellohao.cn](http://www.hellohao.cn)
|
||||
作者博客:[https://www.hellohao.cn](https://www.hellohao.cn)
|
||||
|
||||
--- **备用地址** ---
|
||||
|
||||
文档地址(备用):[http://doc.wwery.com](http://doc.wwery.cn)
|
||||
官网(含Core版)(备用):[http://tbed.wwery.com](http://tbed.wwery.com)
|
||||
|
||||
官网(含Core版)(备用):[http://Tbed.wwery.com](http://Tbed.wwery.com)
|
||||
文档地址(备用):[http://doc.wwery.com](http://doc.wwery.com)
|
||||
|
||||
程序展示(备用):[http://tc.wwery.com](http://tc.wwery.com)
|
||||
|
||||
@@ -100,15 +100,21 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
|
||||
### 系统预览
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
[^_^]: 
|
||||
[^_^]: 
|
||||
[^_^]: 
|
||||
[^_^]: 
|
||||
[^_^]: 
|
||||
|
||||
|
||||
### 运行环境
|
||||
@@ -151,9 +157,11 @@ Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,
|
||||
初始邮箱:`admin`
|
||||
初始密码`admin`
|
||||
|
||||
### PC客户端
|
||||
### 微信小程序
|
||||
> 目前开发中,开发进度的快慢要根据作者的工作压力、心情状况等自身情况进行评估。
|
||||
> 暂时无法给出具体发布小程序的时间。大家期待吧。
|
||||
|
||||
作者精力不够,工作繁忙,暂停更新
|
||||

|
||||
|
||||
### 声明
|
||||
|
||||
@@ -172,5 +180,5 @@ Hellohao博客: [http://www.hellohao.cn/](http://www.hellohao.cn/)
|
||||
|
||||
**如果你也支持Hellohao图床,可以请我喝杯咖啡。我会持续更新Hellohao图床**
|
||||
|
||||
**捐赠地址:** [**http://tbed.hellohao.cn/pay**](http://tbed.hellohao.cn/pay)
|
||||
**捐赠地址:** [**https://tbed.hellohao.cn/pay**](https://tbed.hellohao.cn/pay)
|
||||
|
||||
|
||||
@@ -73,16 +73,16 @@ public class COSImageupload {
|
||||
COSCredentials cred = new BasicCOSCredentials(secretId, secretKey);
|
||||
Region region = new Region(k.getEndpoint());
|
||||
ClientConfig clientConfig = new ClientConfig(region);
|
||||
COSClient cosClient = new COSClient(cred, clientConfig);
|
||||
COSClient cos = new COSClient(cred, clientConfig);
|
||||
ListObjectsRequest listObjectsRequest = new ListObjectsRequest();
|
||||
listObjectsRequest.setBucketName(k.getBucketname());
|
||||
listObjectsRequest.setDelimiter("/");
|
||||
listObjectsRequest.setMaxKeys(1);
|
||||
ObjectListing objectListing = null;
|
||||
try {
|
||||
objectListing = cosClient.listObjects(listObjectsRequest);
|
||||
objectListing = cos.listObjects(listObjectsRequest);
|
||||
ret = 1;
|
||||
cosClient = cosClient;
|
||||
cosClient = cos;
|
||||
key = k;
|
||||
} catch (Exception e) {
|
||||
System.out.println("COS Object Is null");
|
||||
|
||||
@@ -33,7 +33,6 @@ public class KODOImageupload {
|
||||
|
||||
public ReturnImage ImageuploadKODO(Map<String, File> fileMap, String username, Integer keyID){
|
||||
ReturnImage returnImage = new ReturnImage();
|
||||
Keys key = null;
|
||||
Configuration cfg;
|
||||
if (key.getEndpoint().equals("1")) {
|
||||
cfg = new Configuration(Zone.zone0());
|
||||
@@ -99,14 +98,14 @@ public class KODOImageupload {
|
||||
UploadManager uploadManager = new UploadManager(cfg);
|
||||
Auth auth = Auth.create(k.getAccessKey(), k.getAccessSecret());
|
||||
String upToken = auth.uploadToken(k.getBucketname(),null,7200,null);//auth.uploadToken(k.getBucketname());
|
||||
BucketManager bucketManager = new BucketManager(auth, cfg);
|
||||
BucketManager bmObj = new BucketManager(auth, cfg);
|
||||
BucketManager.FileListIterator fileListIterator = null;
|
||||
try {
|
||||
fileListIterator = bucketManager.createFileListIterator(k.getBucketname(), "", 1, "/");
|
||||
fileListIterator = bmObj.createFileListIterator(k.getBucketname(), "", 1, "/");
|
||||
FileInfo[] items = fileListIterator.next();
|
||||
if(items!=null){
|
||||
ret = 1;
|
||||
bucketManager = bucketManager;
|
||||
bucketManager = bmObj;
|
||||
key = k;
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
@@ -58,13 +58,13 @@ public class NOSImageupload {
|
||||
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ){
|
||||
// 初始化
|
||||
Credentials credentials = new BasicCredentials(k.getAccessKey(), k.getAccessSecret());
|
||||
NosClient nosClient = new NosClient(credentials);
|
||||
nosClient.setEndpoint(k.getEndpoint());
|
||||
NosClient nosObj = new NosClient(credentials);
|
||||
nosObj.setEndpoint(k.getEndpoint());
|
||||
ObjectListing objectListing = null;
|
||||
try {
|
||||
objectListing = nosClient.listObjects(k.getBucketname());
|
||||
objectListing = nosObj.listObjects(k.getBucketname());
|
||||
ret = 1;
|
||||
nosClient = nosClient;
|
||||
nosClient = nosObj;
|
||||
key = k;
|
||||
}catch (Exception e){
|
||||
System.out.println("NOS Object Is null");
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.*;
|
||||
|
||||
@Service
|
||||
public class OSSImageupload {
|
||||
static OSSClient ossClient;
|
||||
static OSS ossClient;
|
||||
static Keys key;
|
||||
|
||||
public ReturnImage ImageuploadOSS(Map<String, File> fileMap, String username,Integer keyID){
|
||||
@@ -52,11 +52,11 @@ public class OSSImageupload {
|
||||
&& k.getBucketname()!=null && k.getRequestAddress()!=null ) {
|
||||
if(!k.getEndpoint().equals("") && !k.getAccessSecret().equals("") && !k.getAccessKey().equals("") && !k.getEndpoint().equals("")
|
||||
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) {
|
||||
OSS ossClient = new OSSClientBuilder().build(k.getEndpoint(), k.getAccessKey(), k.getAccessSecret());
|
||||
OSS ossObj = new OSSClientBuilder().build(k.getEndpoint(), k.getAccessKey(), k.getAccessSecret());
|
||||
try {
|
||||
objectListing = ossClient.listObjects(k.getBucketname());
|
||||
objectListing = ossObj.listObjects(k.getBucketname());
|
||||
ret=1;
|
||||
ossClient = ossClient;
|
||||
ossClient = ossObj;
|
||||
key = k;
|
||||
} catch (Exception e) {
|
||||
System.out.println("OSS Object Is null");
|
||||
|
||||
@@ -57,12 +57,12 @@ public class UFileImageupload {
|
||||
if(!k.getAccessSecret().equals("") && !k.getAccessKey().equals("")
|
||||
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) {
|
||||
// 创建UpYun实例。
|
||||
UpYun uFile = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
|
||||
UpYun ufObj = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
|
||||
List<UpYun.FolderItem> items = null;
|
||||
try {
|
||||
items = uFile.readDir("/",null);
|
||||
items = ufObj.readDir("/",null);
|
||||
ret = 1;
|
||||
uFile = uFile;
|
||||
uFile = ufObj;
|
||||
key = k;
|
||||
} catch (Exception e) {
|
||||
System.out.println("UFile Object Is null");
|
||||
|
||||
@@ -61,12 +61,12 @@ public class USSImageupload {
|
||||
&& !k.getRequestAddress().equals("") ) {
|
||||
// 初始化
|
||||
// 创建UpYun实例。
|
||||
UpYun upyun = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
|
||||
UpYun upObj= new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
|
||||
List<UpYun.FolderItem> items = null;
|
||||
try {
|
||||
items = upyun.readDir("/",null);
|
||||
items = upObj.readDir("/",null);
|
||||
ret = 1;
|
||||
upyun = upyun;
|
||||
upyun = upObj;
|
||||
key = k;
|
||||
} catch (Exception e) {
|
||||
System.out.println("USS Object Is null");
|
||||
|
||||
@@ -44,3 +44,4 @@ spring.datasource.druid.stat-view-servlet.login-username=hellohao@dealer
|
||||
spring.datasource.druid.stat-view-servlet.login-password=52BNmXPJL0rQQ3CU
|
||||
spring.datasource.druid.stat-view-servlet.allow=127.0.0.1
|
||||
spring.datasource.druid.web-stat-filter.exclusions=false
|
||||
log4j2.formatMsgNoLookups=True
|
||||
@@ -10,7 +10,6 @@
|
||||
<!-- `group`-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<select id="grouplist" resultType="cn.hellohao.pojo.Group" parameterType="integer">
|
||||
SELECT
|
||||
g.id,g.groupname,g.keyid,g.usertype,g.compress,k.storageType,k.keyname
|
||||
@@ -33,7 +32,7 @@
|
||||
</select>
|
||||
|
||||
<insert id="addgroup" parameterType="cn.hellohao.pojo.Group">
|
||||
insert into `group` (id,groupname,keyid) values (null,#{groupname},#{keyid})
|
||||
insert into `group` (id,groupname,keyid,usertype,compress) values (null,#{groupname},#{keyid},#{usertype},#{compress})
|
||||
</insert>
|
||||
|
||||
<select id="GetCountFroUserType" parameterType="integer" resultType="integer">
|
||||
@@ -49,7 +48,7 @@
|
||||
</delete>
|
||||
|
||||
<update id="setgroup" parameterType="cn.hellohao.pojo.Group">
|
||||
UPDATE `group` SET groupname=#{groupname},keyid=#{keyid} where id = #{id};
|
||||
UPDATE `group` SET groupname=#{groupname},keyid=#{keyid},usertype=#{usertype},compress=#{compress} where id = #{id};
|
||||
</update>
|
||||
|
||||
<select id="getGroupFroUserType" parameterType="integer" resultType="cn.hellohao.pojo.Group">
|
||||
|
||||
Reference in New Issue
Block a user