I’ve been successful in downloading an image to the system.DocumentsDirectory and even loading it using
[lua]
myImage = display.newImage( event.response.filename, event.response.baseDirectory, 60, 40 )
[/lua]
Now that the file is in the DocumentsDirectory, I cannot seen to find a way to access it again using system.pathForFile
Example. There’s now a image file named “180000.png” in the DocumentsDirectory. This is my code to try to load the image.
[lua]
local attendeeImagePath = system.pathForFile( “180000.png”, system.DocumentsDirectory )
local attendeePicture = display.newImageRect( attendeeImagePath, 410, 410)
[/lua]
I’ve also tried this and other variations:
[lua]
local attendeePicture = display.newImageRect( “/DocumentsDirectory/180000.png”, 410, 410)
[lua]
Any help would greatly be appreciated.
Thanks