@@ -89,7 +89,9 @@ const requestListener = function (req, res) {
8989 intcode = "./data/keys/" + intcode
9090 fs . writeFileSync ( intcode , body )
9191
92- fs . readFile ( intcode , 'utf8' , function ( err , data ) {
92+
93+ /*fs.readFile(intcode, 'utf8', function(err, data){
94+
9395 if (err){ throw err; }
9496 var lines = data.split('\n')
9597 var type = lines[2]
@@ -107,10 +109,10 @@ const requestListener = function (req, res) {
107109 lines = lines.join('\n')
108110 //console.log(lines)
109111 /* fs.writeFileSync(intcode, lines); */
110- fs . writeFileSync ( intcode + ".type" , type )
112+ // fs.writeFileSync(intcode+".type",type)
111113console . log ( "File uploaded to " + "\x1b[32m" + intcode . replace ( "./data/keys/" , "" ) + "\x1b[37m" + " Type: " + type )
112114
113- } ) ;
115+ /*})*/ ;
114116
115117
116118 } )
@@ -126,7 +128,7 @@ console.log("File uploaded to "+"\x1b[32m"+intcode.replace("./data/keys/","")+"\
126128 res . end ( data ) ;
127129 } ) ;
128130
129- } else if ( String ( req . url ) . startsWith ( "/download/" ) ) {
131+ } else if ( String ( req . url ) . startsWith ( "/download/" ) && false ) {
130132 //log(String(req.url).replace("/download/",""))
131133 let pathh = ( String ( req . url ) . replace ( "/download/" , "" ) )
132134 pathh = "./data/keys/" + pathh + ".type"
0 commit comments