Thread Alternative zu CGI - Rostis Framework (19 answers)
Opened by rosti at 2018-07-17 10:11

Gustl
 2018-07-16 20:03
#188640 #188640
User since
2011-01-27
441 Artikel
BenutzerIn
[Homepage]
user image
Mit

Code (perl): (dl )
read(STDIN, my $binary, $ENV{CONTENT_LENGTH});


Bekomme ich ja den Inhalt in bin von der Variable content.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
var myfiles = document.getElementById('myfiles').files;
var arr = new Array();
console.log(myfiles.length + " Files")
for(var i = 0; i < myfiles.length; i++){
var file = myfiles[i];
arr.push(i, 'name', file.name);
arr.push(i, 'type', file.type ? file.type : 'application/octet-stream');
arr.push(i, 'bin', file);
}
arr.push('param','upload','1');
var content = bSerialize.array2bin(arr);


Also den Namen, type und bin von der Datei. Jetzt muss ich die ja erst einmal trennen. Wie mache kann ich das tun?

Mit
Code (perl): (dl )
my @array = $bs->bin2array( \$binary ); 
funktioniert es leider nicht.

Danke.

Gruß,
Jörg
Last edited: 2018-07-17 07:59:36 +0200 (CEST)

View full thread Alternative zu CGI - Rostis Framework