Add-on Prevent Duplicate Attachments

TigerXtrm

Member
I've been looking around but haven't been able to find anything so here goes.

I'm in need for an add-on that can check attachments to a post and make sure they don't already exist in the database. If it does already exist it needs to give an error before the message is posted and the duplicate file needs to be deleted from the system after x minutes (to prevent constant uploading and removing, thus wasting bandwidth).

Ideally the system can compare file hashes so that even if the file name is changed, it is still recognized as being the same file. Upon uploading a new file the hash could be extrapolated and placed in the database. But if this is not possible, referencing file name, format and size will have to do.

Does this sound like a realistic idea for an add-on or would it be too resource intensive to check for this, especially on a forum with many attachments?
 
Bump. Any add-on developers willing to take this on for a decent price? Who-ever develops the add-on is free to sell it as his own after it is done as far as I'm concerned.
 
This is a pretty old post, but I could not find much addressing this issue. The database appears to create a unique hash for the data of each attachment but the column is not indexed so may not be used for duplicate checking. I may be wrong in the presumption that two hashes of the same image will result in the same hash but that would surprise me.

I would think that any attempt to upload a duplicate attachment would bring up a popup that would ask to use the current attachment. The usage count is also kept, so deletion from a content item would not need to delete the attachment, just decrement the usage count. It might also be an option to just silently use the old attachment since the observed result would be the same.

We have users that find our vBulletin resource manager sufficiently difficult to use that they just keep uploading the same image whenever it comes up in a new thread. It should be possible in XenForo to let them do whatever they like, but just keep one copy of any given attachment.
 
Back
Top Bottom