<commit_before>const express = require('express')
const multer  = require('multer')
const upload = multer({ dest: 'upload/' })

const app = express()

app.get('/', function (req, res) {
    res.send('Hello World!');
});

app.post('/sound', upload.single('avatar'), function (req, res, next) {
	console.log("Beerkezo file");
    console.log("Eredeti filenev: " + req.file.originalname);
    console.log("File merete(KB): " + req.file.size/1000);
    res.end("Fajl fogadva");
})

app.listen(3000, function () {
    console.log('Example app listening on port 3000!');
});<commit_msg>added renaming of the file to the original name after upload<commit_after>const express = require('express')
const multer  = require('multer')
const upload = multer({ dest: 'upload/' })
const fs = require('fs');

const app = express()

var storage = multer.diskStorage({
  destination: function (req, file, cb) {
    cb(null, '/upload')
  },
  filename: function (req, file, cb) {
    cb(null, req.file.originalname)
  }
})

app.get('/', function (req, res) {
    res.send('Hello World!');
});

app.post('/sound', upload.single('avatar'), function (req, res, next) {
	console.log("Beerkezo file");
    console.log("Eredeti filenev: " + req.file.originalname);
    console.log("File merete(KB): " + req.file.size/1024);

    fs.rename(req.file.path , __dirname + "/upload/" + req.file.originalname);

    console.log("Fajl fogadva es elmentve a " + __dirname + "/upload/" + req.file.originalname + " helyre.");
    res.end("Fajl fogadva");
})

app.listen(3000, function () {
    console.log('Example app listening on port 3000!');
});
{'fraction_non_alphanumeric': 0.18722876627402354, 'fraction_numerical': 0.014879107253564786, 'mean_word_length': 4.2064516129032254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2533579', 'n_tokens_mistral': 562, 'n_tokens_neox': 539, 'n_words': 131}