Compare commits
No commits in common. "af6d0d91384b6860aa6d13eec9f7804125188e62" and "12f6075bc97c2a531cd6c4effec6f9eda2c0d0ad" have entirely different histories.
af6d0d9138
...
12f6075bc9
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "astro-uploader",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.1",
|
||||
"description": "A uploader for uploading the Astro generated files through the S3 API.",
|
||||
"keywords": ["Astro", "S3", "withastro", "opendal"],
|
||||
"bugs": {
|
||||
|
@ -97,12 +97,12 @@ class Uploader {
|
||||
|
||||
async isExist(key: string, size: number): Promise<boolean> {
|
||||
try {
|
||||
const { contentLength } = await this.operator.stat(key);
|
||||
const { contentLength, isFile } = await this.operator.stat(key);
|
||||
if ((contentLength !== null && contentLength !== BigInt(size)) || this.override) {
|
||||
await this.operator.delete(key);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return isFile();
|
||||
} catch (err) {
|
||||
// Just ignore the error for now. If we find better solution for how to handle the opendal error.
|
||||
if (err instanceof Error) {
|
||||
|
Loading…
Reference in New Issue
Block a user