I wrote a Mac program that I can select a local image, resized it and pass to a PHP file to save to my server, which works fine. The other part of the program loads the file from the server back in to the program which I have the problem with.
I have 6 images named "photo0.jpg", "photo1.jpg" and so on. So if a photo exists it over writes it in the PHP code, which it does, and I varified that. But in my objective C code it is loading the old image file still?
When I check the paths manually using FireFox it show the correct image, or the new one that was replaced. But when I load it from with in my program the correct path displays the old image that should have been overwritten?
I even stop the app, quit out of xcode, re launch and reload the images and the same thing? The program works without error, it is just retrieving the file that should have been over written. Is something buffered that needs cleaning out?
Any ideas?
I have 6 images named "photo0.jpg", "photo1.jpg" and so on. So if a photo exists it over writes it in the PHP code, which it does, and I varified that. But in my objective C code it is loading the old image file still?
Code:
int photoNum = [photos intValue]; // gets the count for the num of photos.
for (int i = 0; i < photoNum; i++) {
NSString *photoImagePath = [NSString stringWithFormat:@"%@%@",folderPath,[fileNameArray objectAtIndex:i]];
NSImage *photoImage = [[NSImage alloc]initWithContentsOfURL:[NSURL URLWithString:photoImagePath]];
NSImageView *photoView = [photoObjectArray objectAtIndex:i];
photoView.image = photoImage;
}
When I check the paths manually using FireFox it show the correct image, or the new one that was replaced. But when I load it from with in my program the correct path displays the old image that should have been overwritten?
I even stop the app, quit out of xcode, re launch and reload the images and the same thing? The program works without error, it is just retrieving the file that should have been over written. Is something buffered that needs cleaning out?
Any ideas?