I want to develop a Photo Journal app, which will allow users to take pictures, record videos and arrange them in albums. What is the best place to save images. Should I save them into Documents folder or any other place. Please be kind!
Asked
Active
Viewed 121 times
2
-
u can add the images to database... – ankit yadav Jul 22 '13 at 06:24
-
duplicate like http://stackoverflow.com/questions/14430935/best-way-to-store-images-in-ios – iPatel Jul 22 '13 at 06:25
-
Use the Caches Directory... – IronManGill Jul 22 '13 at 06:26
-
@IronManGill Apple says about Documents: Use this directory to store critical user documents and app data files. Critical data is any data that cannot be recreated by your app, such as user-generated content. The contents of this directory can be made available to the user through file sharing. The contents of this directory are backed up by iTunes. – Ali Sufyan Jul 22 '13 at 06:33
-
@IronManGill Why did you suggest Caches Directory? I guess Chaches directory is now called Library? – Ali Sufyan Jul 22 '13 at 06:35
-
Yeh so store it in the Caches directory ... read about it.. – IronManGill Jul 22 '13 at 06:35
-
Caches Directory was suggested for iOS 5.0 and downloaded data that can be redownloaded – jcesarmobile Jul 22 '13 at 06:39
-
2The cache directory is not a good place for this type of content. Otherwise it will be deleted if disk space gets low, resulting in a loss of data that is not restorable. – borrrden Jul 22 '13 at 06:43
-
@ankityadav: bad suggestion, never save images to database (store images in document directory and save the relative path to database). – Midhun MP Jul 22 '13 at 06:43
-
Thanks to all! But I am still confused Documents or Chaches? – Ali Sufyan Jul 22 '13 at 06:45
-
@MidhunMP but we have blob in sql specially for images,if m not wrong. – ankit yadav Jul 22 '13 at 06:55
1 Answers
2
As it's user generated data, store the images and videos in the NSDocumentDirectory

jcesarmobile
- 51,328
- 11
- 132
- 176