mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Fix bug
This commit is contained in:
parent
7e8d7f14e7
commit
f052760c69
2 changed files with 3 additions and 3 deletions
|
@ -95,9 +95,9 @@ export class DriveFile {
|
|||
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
length: 256,
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public accessKey: string;
|
||||
public accessKey: string | null;
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
|
|
|
@ -16,7 +16,7 @@ export default async function(file: DriveFile, isExpired = false) {
|
|||
if (file.webpublicUrl) {
|
||||
InternalStorage.del(file.webpublicAccessKey);
|
||||
}
|
||||
} else {
|
||||
} else if (!file.isRemote) {
|
||||
const minio = new Minio.Client(config.drive.config);
|
||||
|
||||
await minio.removeObject(config.drive.bucket, file.accessKey);
|
||||
|
|
Loading…
Reference in a new issue