I am using the UIImagePickerController to take Images and videos for the App. What i need to ensure is the app takes minimum storage. So as soon as i have taken the image/video i upload it to my server so that i can access it using a url now.
Thus what i need is whenever the app terminates , i want to clear all the images and videos taken , so as to ensure less memory is consumed.
Please note that i do not want to delete the file immediately after uploading. I know how to delete a file from a directory individually.
Kindly suggest some other approach if I am wrong.