0

An example web application X allows its clients to upload various resources, e.g. images. These uploaded resources can also be removed by the user at a later time.

My question is this: what are the general practices regarding resource retention/removal? When, if ever, does it make sense to remove the actual files from the storage rather than just forget about their existence by removing any references/links to them? Are there more considerations beyond:

  • (storage needs) x (storage cost) VS (budget);
  • adhering to privacy requirements / removing sensitive data?

For example, does it make sense to clean up unused files just to have a tidier database/storage?

  • It depends on your application. Can they choose uploaded images? If yes, they might think its something wrong with you application if their images suddently is gone. – Mr Zach Jan 14 at 12:47
  • Yes they can, but I have taken that into account. I count references where applicable, so the question is still valid. Should I bother deleting the files once the reference count is zero (i.e. the file is no longer used anywhere)? – Avius Jan 14 at 13:36
  • When its not in use anywhere, does that mean the user cant se it anywhere and never select it from some image library? if that's the case i would deleted the file. But if the user can se the image in his/her library, but didn't use it for anything (maybe yet) i would not delete it. – Mr Zach Jan 14 at 14:04
  • 1
    that's your technical idea about it, but for many people they would say its not in use as long as its not used in any webpage, blog etc but still available as something to insert when they create something (webpage, blog, sending email etc) anyway. If its not in use as you describe it. there is really no reason for you to collect it and depends on where you are located in the world it might even be against the law to keep that kind of information. – Mr Zach Jan 14 at 14:35
  • 1
    If you never physically remove inaccessible files, then you have opened a nice door for hackers to either make storage costs an issue (weven if you are the size of Amazon or Google) or to cause a DoS due to lack of storage space. Just imagine someone uploading a large file and then immediately deleting it, only to repeat that cycle. – Bart van Ingen Schenau Jan 14 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.