-1

What I am trying to do is that when I upload an audio file which needs to be processed it gets stored in the server, but that file is not needed anymore after user leaves the website. How should I efficiently manage this in Django? Thankyou

1 Answers1

1

Just delete the file after processing?

import os
os.remove(path_to_file)
ohrstrom
  • 2,890
  • 2
  • 20
  • 34
  • Thanks. Even I thought of doing so but I thought to confirm if any other solution exists. Anyways I will use os.remove() . – Prashant Kumar Jun 18 '16 at 15:11
  • Django is just Python :) See also this post about that topic: http://stackoverflow.com/questions/6996603/how-do-i-delete-a-file-or-folder-in-python – ohrstrom Jun 18 '16 at 15:22