Skip to content

Commit dc267d0

Browse files
committed
Coding Puzzle
1 parent 2f2f8cd commit dc267d0

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Coding Puzzle/main.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$(document).ready(function() {
2+
function handleFileSelect() {
3+
const file = document.getElementById('fileInput').files[0];
4+
const reader = new FileReader();
5+
reader.readAsBinaryString(file);
6+
reader.onload = function() {
7+
const binaryString = reader.result;
8+
const asciiString = convertBinaryToAscii(binaryString);
9+
const unicodeString = convertBinaryToUnicode(binaryString);
10+
// Gib die Ergebnisse aus oder tue etwas anderes damit
11+
};
12+
}
13+
14+
});

Coding Puzzle/upload.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Upload</title>
6+
</head>
7+
<body>
8+
<h1>Datei-Upload</h1>
9+
<form>
10+
<label for="fileInput">Wähle eine Datei aus:</label>
11+
<input type="file" id="fileInput" onchange="handleFileSelect()">
12+
</form>
13+
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)