We do not have access to the file name on iOS. Thus, in the interest of being cross-platform, we will not provide access to the file name on any other platform.
That said, you can work-around this issue by telling media.show() to save to file in your app’s local directory instead as shown below. This feature was added to the newest daily builds (not available in release build 704).
[lua]local onComplete = function(event)
if event.completed then
– Image was saved successfully.
else
– User canceled out.
end
end
local filePath = { baseDir = system.TemporaryDirectory, filename = “MyPhoto.jpg” }
media.show( media.PhotoLibrary, onComplete, filePath )[/lua]
Adding that 3rd argument tells media.show() to save to file instead of displaying the selected photo as a display object. The advantage being that the photo will be saved at the same resolution as the original photo in the photo library. Also, the Lua listener’s “event.target” property will be set to nil in this case. If you omit the 3rd file argument, then media.show() will do the old behavior.
One more thing, this feature is currently only supported on iOS and Android. It is not supported on the Corona Simulator yet.
[import]uid: 32256 topic_id: 24767 reply_id: 100625[/import]