Commit 50de159f authored by duanjinfei's avatar duanjinfei

fix upload file failed retry

parent 5bc65589
......@@ -50,6 +50,15 @@ async function cacheUserRank(supabase) {
if (uploadError) {
console.error('Error uploading file to storage:', uploadError);
const { error } = await supabase.storage
.from(bucketName)
.upload(fileName, new Blob([jsonData]), {
contentType: 'application/json',
upsert: true, // 如果文件已存在则覆盖
});
if (error) {
console.error('Twice Error uploading file to storage:', error);
}
}
const holdersCountFileName = `${directory}/user_holders.json`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment