WWW loading not working on Windows, working on Mac

Hi,
I am attempting to load a user selected image file into a Sprite at runtime using the following code

fullFilePath = "file://" + userPath;
fileObject = new WWW(fullFilePath);
                
// Create new Sprite based on the loaded file
Sprite newSprite = Sprite.Create(fileObject.texture,
                       new Rect((float)(Screen.width / 2 - (fileObject.texture.width / 2)),
                                                     ((float)(Screen.height / 2) - (fileObject.texture.height / 2)),
                                                     (float)fileObject.texture.width,
                                                     (float)fileObject.texture.height),
                                                Vector2.zero);

Even though this works on a Mac, when running the project on Windows8.1 i get the following error:
You are trying to load data from a www stream which had the following error when downloading.
Couldn’t open file /Users/George/Pictures/1376532887242.jpg

Any ideas on what could be going wrong?

Many Thanks

Try creating the sprite once your WWW operation is complete…
I mean use “www.isDone” or in your case “fileObject.isDone” as a check before creating the sprite.

I am assuming that you are using a Coroutine for this …if not you must…because WWW is an async operation

Follow the code…

if(fileObject.isDone)
{
// Create new Sprite based on the loaded file
Sprite newSprite = Sprite.Create(fileObject.texture,
                       new Rect((float)(Screen.width / 2 - (fileObject.texture.width / 2)),
                                                     ((float)(Screen.height / 2) - (fileObject.texture.height / 2)),
                                                     (float)fileObject.texture.width,
                                                     (float)fileObject.texture.height),
                                                Vector2.zero);
}

Hope that is helpful

Cheers
Ketan