Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Get File Size Photo gallery

Does anyone know if it is possible to get the selected file size when you choose a Picture or Video from the photo gallery?

— asked July 8th 2010 by donovan lewis
  • file
  • gallery
  • photo
  • selector
  • size
0 Comments

4 Answers

  • Anyone have an idea on this?

    — answered July 9th 2010 by donovan lewis
    permalink
    0 Comments
  • Anyone know if this is even possible? Still trying to find out if I can do it.

    — answered July 28th 2010 by donovan lewis
    permalink
    0 Comments
  • It seems nobody knows.

    — answered January 18th 2011 by Adnan Ahmad
    permalink
    0 Comments
  • AFAIK, you can't tell the file size directly. What you can do is grab the media contents, write it to a temporary file, check the length of the temporary file, then delete it. For a photo, chances are that will work fine and relatively quickly. If you happen to select a high definition video that is 10 minutes long, it is another story.

    — answered January 18th 2011 by Doug Handy
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.