Can't get the dimensions - height and width: the result is always "undefined". I clearly don't understand how JavaScript works here. I am however, able to display the file.
The PHP file contains the following input tag, which selects multiple pictures:
$output = "<input class=\"wpisNazwyWkladow\"
id=\"wpis_tabela_zdjecie_wybieracz\" type=\"file\" multiple
name=\"ads_photofile\">";
This is the JavaScript script in question:
var input = $(this); // works
var ilosc = input[0].files.length;
var pliki = input[0].files;
for (var i = 0; i < ilosc; i++)
{
var tmppath = URL.createObjectURL(pliki[i]); // works - displays
var nazwa = pliki[i].name; // works
var tempRozmiar = pliki[i].size; // works
var typ = pliki[i].type; // typ fotki // works
// The part that does not work:
tempWysokosc = tmppath.height;
tempSzerokosc = tmppath.width;
}
I'm expecting an integer value for "tempWysokosc" and "tempSzerokosc".
Need help please.