@@ -245,8 +245,8 @@ const uploadMedia = async (req: Request, res: Response, version:string): Promise
245
245
const createdate = new Date ( Math . floor ( Date . now ( ) ) ) . toISOString ( ) . slice ( 0 , 19 ) . replace ( "T" , " " ) ;
246
246
const insertResult = await dbInsert (
247
247
"mediafiles" ,
248
- [ "pubkey" , "filename" , "original_hash" , "hash" , "status" , "visibility" , "date" , "ip_address" , "magnet" , "blurhash" , "filesize" , "comments" ] ,
249
- [ filedata . pubkey , filedata . filename , filedata . originalhash , filedata . hash , filedata . status , 1 , createdate , getClientIp ( req ) , filedata . magnet , filedata . blurhash , filedata . filesize , "" ] ) ;
248
+ [ "pubkey" , "filename" , "original_hash" , "hash" , "status" , "active" , " visibility", "date" , "ip_address" , "magnet" , "blurhash" , "filesize" , "comments" ] ,
249
+ [ filedata . pubkey , filedata . filename , filedata . originalhash , filedata . hash , filedata . status , 1 , 1 , createdate , getClientIp ( req ) , filedata . magnet , filedata . blurhash , filedata . filesize , "" ] ) ;
250
250
251
251
filedata . fileid = insertResult . toString ( ) ;
252
252
if ( insertResult == 0 ) {
@@ -558,6 +558,7 @@ const getMediabyURL = async (req: Request, res: Response) => {
558
558
res . setHeader ( 'Content-Type' , 'image/webp' ) ;
559
559
return res . status ( 404 ) . send ( await getNotFoundMediaFile ( ) ) ;
560
560
}
561
+ logger . debug ( filedata [ 1 ] )
561
562
if ( filedata [ 1 ] != "1" ) {
562
563
logger . warn ( `RES -> 401 File not active - ${ req . url } ` , "| Returning not found media file." , getClientIp ( req ) ) ;
563
564
0 commit comments