iOS Question get filesize and filename

ilan

Expert
Licensed User
Longtime User
hi

i would like to get the filesize and the filename from all photos in my phone.
i am using @narek adonts AllAssets wrap to get a list of all photos. then i put them to a tableview because if the user will have a lot of photos it would take to long to load them to a scrollview i guess and a tableview is loading only cells that are visible so it should run faster.

until now everything works but i would like to get the filesize and the filename returned from all photos. i could not figure out how to extend nareks class to do that can someone please help me??

i have created a very bad workarroundto get the filesize. what i do is saving each image in a loop and check his size. i know its a terrible workarround so can someone help me get the filesize and filename from the allassets class?

the class can be found here: https://www.b4x.com/android/forum/t...tive-alassets-framework-photos.65231/#content


thanx, ilan
 

wl

Well-Known Member
Licensed User
Longtime User
Hi Ilan,

I also need the functionality to select photo's from my iphone and upload them. The demo of ALAssets is not so clear to me. How did you manage to get all the file names ? Did you succeed in getting the file sizes ? And how do you get and upload them ?

Thanks !
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
How did you manage to get all the file names ? Did you succeed in getting the file sizes ? And how do you get and upload them ?

Because of not getting any answers from the creator of this class after few months i have decided not to use this class. sorry.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Hi,

In attachment a small demo application. I created a class "Asset" with relevant code I found here and there in the fora and made some small modifications (thanks to all who helped me with this !).

Currently I have not yet added the size of the images/movies, but this should be possible: see https://developer.apple.com/documentation/assetslibrary/alassetrepresentation

Greetings
 

Attachments

  • IOSuploader.zip
    5.2 KB · Views: 209
Upvote 0
Top