Skip to content

Commit

Permalink
Merge pull request #59 from lava081/master
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-cn authored Mar 26, 2024
2 parents b5cd4ba + 5d8945f commit 642a459
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export async function getBase64FromWeb(url:string){
export function getFileBase64(file:string|Buffer){
if(Buffer.isBuffer(file)) return file.toString('base64')
if(file.startsWith('http')) return getBase64FromWeb(file)
if(file.startsWith('base64://')) return file.replace('base64://', '')
try { return getBase64FromLocal(file) } catch {}
return file
}
Expand Down

0 comments on commit 642a459

Please sign in to comment.