Displaying a Remote Image - Network library Limitation

Hi there,

I want to load a remote image via http(s) and display it in my HTML5 app, but I have this limitation:

I can’t save the image in my host.

So, if the methods that Corona ( network.requestnetwork.loadRemoteImage and network.dowload ) provides requires the filename property that will be the file to which the response will be saved, how can I doing this?

If your host completely prevents you from saving any files, even temporarily, then you can’t use remote images as is.

You could, technically, convert the image that you want to send into JSON (or have a vector image’s definitions) and use that JSON data for creating a raster JPG/PNG, but this is far from a trivial task.

Can you find another web hosting service or photo sharing service, like Flickr, anything that you can get a URL to?

Rob

Ok, thanks a lot!

I really don’t understand you… I already have a URL, but how I can reference the image if it need to be host in my own directory.

According to the sintaxis in the network listener an image can be display it like this:

display.newImage( event.response.filename, event.response.baseDirectory, 60, 40 )

and the baseDirectory needs to be the same of my app

If your host completely prevents you from saving any files, even temporarily, then you can’t use remote images as is.

You could, technically, convert the image that you want to send into JSON (or have a vector image’s definitions) and use that JSON data for creating a raster JPG/PNG, but this is far from a trivial task.

Can you find another web hosting service or photo sharing service, like Flickr, anything that you can get a URL to?

Rob

Ok, thanks a lot!

I really don’t understand you… I already have a URL, but how I can reference the image if it need to be host in my own directory.

According to the sintaxis in the network listener an image can be display it like this:

display.newImage( event.response.filename, event.response.baseDirectory, 60, 40 )

and the baseDirectory needs to be the same of my app