Why i cant load jpg's from x10 host...???

ikonen.olavi79

New Member
Messages
23
Reaction score
0
Points
0
I've uploaded jpg's in binary mode and the extension is .jpg - not .JPG. Now - when i look the folder, all the jpg's MIME types are text/x-generic when, i think, it has to be image/jpeg. Does the host even know it's a image data???
Some jpg's come but about 90% of files dont download. Belov is a skeleton of the download code. I've tried all kind of tricks ex. timed download, waiting, checking content etc...but none worked. What the hell is the problem - is it me or is it x10 host. I think it's the lattes so HELP me in this...

If whole script is needed, you'll get it. But this is the preload function, all others are irrelevant.

Code works just fine in client enviroment.

Olli.

Code:

///////////////////////////////
// preload images to memory
///////////////////////////////
function preloadimages(category)
{
if(isImagesLoaded)
{
return;
}
// preload category images
for(i = 0; i < items.length; i++)
{
if(items._category == category)
{
itemImages = new Image();
itemImages.src = items._image1;
++itemCount;
}
}
itemCategory = category;
isImagesLoaded = true;
init();
}
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Yes. All the code would be nice. And a url.

Some load. Which ones? The same ones each time? Is there a pattern?
 

ikonen.olavi79

New Member
Messages
23
Reaction score
0
Points
0
Yes, there is a pattern an they are always the same pics which load. I' ve chanced the order and tried to paste new data to ones which load and save it with new name. But nothing seems to work. Always the same ones load, others not...check it in cisoft.x10.mx and u know what i mean. Go eg. to Tuotteet->Lelut (Products->Toys)...now i have to check the file differences using hex editor. Or - any succestions?
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
The servers here are *nix, which is case sensitive.

Looking at your code, for example, it lists pics/kippivaunu.jpg but the image name on the server is Kippivaunu.jpg . So, the server is reporting the file as not found.

It would work on a Windows server, but not on Linux.

A best practice is to always use lowercase file names.
 

ikonen.olavi79

New Member
Messages
23
Reaction score
0
Points
0
Thanks, that solved the problem. I'm used to work in Windows enviroment which is not case sensitive and did not thought it at all...but many thanks for u. U save my day...
 
Top