<commit_before><?php 
	if(isset($_FILES['file'])){
		
		//Get input data
		$file = $_FILES['file'];
		$file_name = $file['name'];
		$file_tmp = $file['tmp_name'];
		$file_size = $file['size'];
		$file_ext = explode('.', $file_name);
		$file_ext = strtolower(end($file_ext));
		$file_error = $file['error'];
		$root_url = '../../models';
		$allowed = array('x3d');
		$name = $_POST['name'];
		$text = $_POST['text'];
		$cat = $_POST['cat'];

		if (in_array($file_ext, $allowed)){
			if ($file_error === 0){
				if ($file_size <= 52428800){
				
					// Create database-entry
					$conn = require '../php/db_connect.php';
				
					$sql = "INSERT INTO models (name, description, classification) VALUES ('$name','$text', '$cat')";
				
					$conn->query($sql);
					$last_id = $conn->lastInsertId();<commit_msg>Upload: create size-entry in database.<commit_after><?php 
	if(isset($_FILES['file'])){
		
		//Get input data
		$file = $_FILES['file'];
		$file_name = $file['name'];
		$file_tmp = $file['tmp_name'];
		$file_size = $file['size'];
		$file_ext = explode('.', $file_name);
		$file_ext = strtolower(end($file_ext));
		$file_error = $file['error'];
		$root_url = '../../models';
		$allowed = array('x3d');
		$name = $_POST['name'];
		$text = $_POST['text'];
		$cat = $_POST['cat'];

		if (in_array($file_ext, $allowed)){
			if ($file_error === 0){
				if ($file_size <= 52428800){
				
					// Create database-entry
					$conn = require '../php/db_connect.php';
				
					$sql = "INSERT INTO models (name, description, classification, size) VALUES ('$name','$text', '$cat', '$file_size')";
				
					$conn->query($sql);
					$last_id = $conn->lastInsertId();
{'fraction_non_alphanumeric': 0.23118603251053582, 'fraction_numerical': 0.012040939193257074, 'mean_word_length': 3.6554621848739495, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5598490', 'n_tokens_mistral': 713, 'n_tokens_neox': 582, 'n_words': 119}