Skip to content

Commit

Permalink
rm debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
muse254 committed Dec 22, 2024
1 parent 16af9a8 commit 7aaab1d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/indexed_db.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,14 @@ export async function serve_static(db_name, body, asset_size_limit, file_type, u

// we've reached our limit no more caching
if (used_storage + (body.length / (1024 * 1024)) > asset_size_limit) {

console.log('Storage limit reached, not caching asset...')
console.log('Asset size: ', body.length / (1024 * 1024), 'MB')
console.log('Storage used: ', used_storage, 'MB')
console.log('Storage limit: ', asset_size_limit, 'MB')

console.log(`Storage limit ${asset_size_limit} MB reached, not caching asset...`)
const blob = new Blob([body], {
type: file_type
});

return URL.createObjectURL(blob)
} else {
console.log('Storage limit not reached, caching asset...')

console.log('Asset size: ', body.length / (1024 * 1024), 'MB')
console.log('Storage used: ', used_storage, 'MB')
console.log('Storage limit: ', asset_size_limit, 'MB')
}


let db = open_db(db_name, body)
if (!db)
return
Expand Down

0 comments on commit 7aaab1d

Please sign in to comment.