Auto delete Orphaned Attachments not linked to any message

https://www.phpbb.com/ideas/
Author:
peopleopinion
Posted:
Sat Dec 14, 2013 2:23 am
Rating:
Status:
New
User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Auto delete Orphaned Attachments not linked to any message

Post by peopleopinion » Sat Dec 14, 2013 2:23 am

What about to implement a new feature to automatically delete Orphaned Attachments (that are not linked to any message) and so they are unreachable instead doing it manually?
This can be done by chron job or something.
An option could be available to set after how many days (5-10 by default) from upload an Orphaned Attachment has to be deleted so that in the meantime a staff member could choose to link manually an attachment to a message if he knows which is the correct destination message.
It is an interesting feature because it could help to save administration time and disk space on server.

----------

View idea at: Auto delete Orphaned Attachments not linked to any message

Posted by peopleopinion
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Fri Jan 24, 2014 2:59 am

I would propose a further option/feature to allow users to link orphaned Attachments to their messages.
This because they could know better than staff members where the attachment is linked to, especially if they own it.
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Master_Cylinder » Fri Jan 24, 2014 3:24 am

I just checked one of my busier servers that also allows users to delete their own posts forever, which is rare, and going back over 2 years there are only about 50 megs of orphaned attachments. I don't think this saves as much time as you would think although the amount of space it would save might vary. All an admin has to do is click "mark all" for the delete column and then submit.

The problem with your other option is that once abandoned, the server doesn't know who owned the attachments (that's why they're abandoned) either. So, *that* would require more database changes to mark an owner for attachments in case the topic is deleted or the topic isn't submitted which is less often for most servers.

Save time? 5 seconds every 2 years. If I even bothered to do it.
Save space: varies depending on server attachment size settings and type of board/attachments but since it's just a matter of seconds to manually delete, I don't see the issue if you planed on auto-deleting anyway.

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Fri Jan 24, 2014 5:54 pm

Accordingly to what you say at this point I really don't understand the need to have orphaned attachments management system at all: if a user upload attachments and then doesn't confirm the publication of the msg, attachments has to be deleted directly, end of games.
We have complex computer systems to automate repetitive task and then we complicate these things by creating a completely useless feature like that?
Is it useful for something this feature?
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51824
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Brf » Fri Jan 24, 2014 6:00 pm

By what magical process would you decide to delete the attachment?

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Fri Jan 24, 2014 6:36 pm

Brf wrote:By what magical process would you decide to delete the attachment?
If I'm not wrong there is a list of orphaned attachments in the board... that's not magical.
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51824
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Brf » Fri Jan 24, 2014 6:40 pm

peopleopinion wrote: Accordingly to what you say at this point I really don't understand the need to have orphaned attachments management system at all: if a user upload attachments and then doesn't confirm the publication of the msg, attachments has to be deleted directly, end of games.
I was just saying you need some sort of system to delete the attachment, it cannot be "deleted directly".

Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Master_Cylinder » Fri Jan 24, 2014 9:04 pm

Brf wrote:
peopleopinion wrote: Accordingly to what you say at this point I really don't understand the need to have orphaned attachments management system at all: if a user upload attachments and then doesn't confirm the publication of the msg, attachments has to be deleted directly, end of games.
I was just saying you need some sort of system to delete the attachment, it cannot be "deleted directly".
I think he just wants a cron job so he doesn't have to do 2 mouse clicks every few years to empty it manually... :roll:

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Fri Jan 24, 2014 10:54 pm

Master_Cylinder wrote:I think he just wants a cron job so he doesn't have to do 2 mouse clicks every few years to empty it manually...
This could be a solution.
Another solution could be that if a user upload one or more attachments files but doesn't save the related post the system reveal that there isn't any post related to such attachments but they are Orphaned and when the user close the page without saving the post all related attachments are deleted. If the browser crashes and the routine does not run a cron job can do the work as well. In such way the whole orphaned attachment management section is no longer needed.
Simply, clear, clever, automatic. No human intervention is needed to do such job, infact why wasting time when the whole work could be automated?
Last edited by peopleopinion on Fri Jan 24, 2014 10:57 pm, edited 1 time in total.
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Master_Cylinder » Fri Jan 24, 2014 10:55 pm

Or another solution would be to click the mouse a couple of times every year or so...

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Fri Jan 24, 2014 11:00 pm

Master_Cylinder wrote:Or another solution would be to click the mouse a couple of times every year or so...

Why wasting time when the whole work could be automated? Humans could use their time to do important things not unuseful ones.
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Master_Cylinder » Fri Jan 24, 2014 11:04 pm

peopleopinion wrote:
Master_Cylinder wrote:Or another solution would be to click the mouse a couple of times every year or so...

Why wasting time when the whole work could be automated? Humans could use their time to do important things not unuseful ones.
You're imagining a problem that doesn't exist, it's only 2 clicks. Once again, you want really obscure things that nobody but you really needs... and you want it in the core. :roll:

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51824
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Brf » Sat Jan 25, 2014 12:22 am

peopleopinion wrote: when the user close the page without saving the post all related attachments are deleted.
that is the problem. You have no way of knowing that the user has closed the page, or browsed to another one.

User avatar
peopleopinion
Registered User
Posts: 372
Joined: Thu Nov 07, 2013 7:12 pm
Contact:

Re: Auto delete Orphaned Attachments not linked to any messa

Post by peopleopinion » Sat Jan 25, 2014 12:34 am

Brf wrote:
peopleopinion wrote: when the user close the page without saving the post all related attachments are deleted.
that is the problem. You have no way of knowing that the user has closed the page, or browsed to another one.

Code: Select all

jQuery:

$(window).unload( function () { code to delete unwanted attachments} );

or javascript:
window.onunload = function(){code to delete unwanted attachments;}

onbeforeunload = function(){ code to delete unwanted attachments };
Hope these help Otherwise some kind of cron job could be useful instead.
Please explicate why you voted negative or positive, so it will be possible to better understand each one's point of view.
Please visit and vote my website and express freely your opinion on it (phpbb ver.: 3.0.12):
http://peopleopinion.altervista.org
Thanks. Best Regards, peopleopinion.

Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: Auto delete Orphaned Attachments not linked to any messa

Post by Master_Cylinder » Sat Jan 25, 2014 5:09 am

peopleopinion wrote: Hope these help Otherwise some kind of cron job could be useful instead.
An extension might be useful but it's not needed and I doubt they'll waste their time for such a thing in the core...

Post Reply

Return to “phpBB Ideas”