File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ) ;
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments