Skip to main content
July 29, 2011
Question

Is there a way to get the filename only on iOS using CameraRoll?

  • July 29, 2011
  • 1 reply
  • 1617 views

This post is a sidetrack from this post: http://forums.adobe.com/thread/848761?tstart=0


The method used in that post works perfect on both Android and iOS for selecting and uploading files.... BUT is there a way to get the filename of the file from the mediaPromise cross-plattform?

If you let the user select an image it's not very nice to have the image be called "temp.jpg" after uploading - you want the user to know which image he/her have uploaded

Any ideas? The "mediaPromise.file.relativePath()" works on Android but not on iOS. Not "mediaPromise["file"].url/relativePath/nativePath" either.

Thank you

This topic has been closed for replies.

1 reply

July 29, 2011

... it would also be nice to allow the user to actually view the image before storing on disk and uploading. So you don't have to store it everytime you want to display it in your APP. But as I've learned this isn't available on iOS at all?

If you want the user to select 10-25 images and having to save them on disk everytime just to let him/her view it in the app the app repository would get quite large (25*2mb=50mb).

Participating Frequently
July 29, 2011

There is no way to get a file name on iOS.

You can display the image without saving it to disk using Loader.loadMediaPromise() or loader.loadBytes().

July 29, 2011

Thanks for the reply Joe. Then I'll stop looking and try to work around it.

How many images do you think the application can keep in memory before starting to slow down? Would you be able to select 25 images and keep them "stored" inside the app using loadMediaPromise() or will the memory run crazy you think?