๐Ÿ“๐Ÿ–ผ๏ธ๐Ÿน A small thing where I can upload a file and get a link back. https://media.strawmelonjuice.com/
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

small error wipers

+3 -2
+3 -2
index.ts
··· 355 355 // Query files based on user permissions 356 356 const filesQuery = userResult.is_admin 357 357 ? db.query(`SELECT id, owner, filename FROM file_mapping`) 358 - : db.query( 358 + : db.prepare( 359 359 `SELECT id, owner, filename FROM file_mapping WHERE owner = ?1`, 360 360 [username], 361 361 ); ··· 364 364 365 365 // Add file sizes to the response 366 366 const filesWithSizes = await Promise.all( 367 - files.map(async (file) => { 367 + files.map(async (file_) => { 368 + const file = file_ as {filename: string, id: string}; 368 369 const filePath = `./data/files/${file.id}/${file.filename}`; 369 370 const fileObj = Bun.file(filePath); 370 371 let size = 0;