Compare commits

...

3 Commits

2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "astro-uploader",
"version": "1.1.1",
"version": "1.1.3",
"description": "A uploader for uploading the Astro generated files through the S3 API.",
"keywords": ["Astro", "S3", "withastro", "opendal"],
"bugs": {

View File

@ -97,12 +97,12 @@ class Uploader {
async isExist(key: string, size: number): Promise<boolean> {
try {
const { contentLength, isFile } = await this.operator.stat(key);
const { contentLength } = await this.operator.stat(key);
if ((contentLength !== null && contentLength !== BigInt(size)) || this.override) {
await this.operator.delete(key);
return false;
}
return isFile();
return true;
} catch (err) {
// Just ignore the error for now. If we find better solution for how to handle the opendal error.
if (err instanceof Error) {