remove: check zero size
This commit is contained in:
parent
ab29a1eb0b
commit
0dae4872b0
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/oss",
|
"name": "@kevisual/oss",
|
||||||
"version": "0.0.11",
|
"version": "0.0.12",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
|
@ -157,9 +157,6 @@ export class OssBase implements OssBaseOperation {
|
|||||||
const bucketName = this.bucketName;
|
const bucketName = this.bucketName;
|
||||||
try {
|
try {
|
||||||
const obj = await this.client.statObject(bucketName, `${this.prefix}${objectName}`);
|
const obj = await this.client.statObject(bucketName, `${this.prefix}${objectName}`);
|
||||||
if (obj && checkFile && obj.size === 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return obj;
|
return obj;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code === 'NotFound') {
|
if (e.code === 'NotFound') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user