Last modified: 2008-06-16 21:46:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15434, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13434 - Show warning when hash identical file exists
Show warning when hash identical file exists
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-19 17:03 UTC by Raimond Spekking
Modified: 2008-06-16 21:46 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2008-03-19 17:03:58 UTC
Show a warning, when a file with the same SHA1 hash already exists.
Comment 1 ThomasV 2008-03-26 19:54:38 UTC
I guess it should be possible to compute the hash on the client, using javascript.
If the image is a dupe, one would would avoid uploading the image and thus save bandwidth.
Comment 2 Bryan Tong Minh 2008-03-26 20:00:00 UTC
I don't think JavaScript has access to local files?
Comment 3 Roan Kattouw 2008-03-26 20:20:13 UTC
(In reply to comment #2)
> I don't think JavaScript has access to local files?
> 

Not without ActiveX, which is evil.
Comment 4 Brion Vibber 2008-03-26 23:19:08 UTC
Nope, can't calc the hash client-side. Would have to upload it to the server, then display a warning there. A bit annoying. :)
Comment 5 Raimond Spekking 2008-06-02 18:45:56 UTC
Fixed with r35609 by Brion.
Comment 6 Waldir 2008-06-14 15:55:45 UTC
Just for the record, I just tested this by re-uploading an image I had already uploaded to commons (which is running r36279 atm) and I did get the warning when trying to upload it to the same dest filename (i.e., I got both the filename dupe message and the image dupe msg each with its own entry in a bulleted list). However, when trying to upload to a different name, I got no warning, and was taken directly to the image page, and /there/ a message appears referring to the duplicate file.

Does this have anything to do with the fact that I had js disabled during upload (the new js-enhanced form bothers me a bit)? In any case, it shouldn't since I get a same-filename warning with js off, so this should work too. Perhaps the bug should be reopened?
Comment 7 Brion Vibber 2008-06-16 20:28:56 UTC
No warning will be displayed if you have checked "ignore warnings".

No JavaScript is involved.

I just confirmed that I do receive the warning ("This file is a duplicate of the following file:" plus the thumbnail) when uploading a duplicate copy of http://commons.wikimedia.org/wiki/Image:Wikipedia-logo-gan.png as "Image reupload test file.png", with all text fields on the form filled with "xxx", GFDL selected as license, and nothing else altered.

Tested on Commons, logged in as sysop, English UI, in Firefox 3.0 release candidate on Mac.
Comment 8 Waldir 2008-06-16 21:00:02 UTC
Ah, just tried again, and figured what happened. When you get to the page with the pre-upload warnings, if you choose to return to the upload form, the "ignore warnings" checkbox is automatically checked, even though it wasn't before (otherwise you wouldn't see the warnings in the first place). I don't know why that happens, it doesn't make sense to me. It would if the option was stored permanently, but it's not. And in that specific case if you originally wanted to ignore the warnings you wouldn't have returned to the upload form, but rather continued with the upload.

Perhaps I should file a new bug for this (usability?) problem...
Comment 9 Raimond Spekking 2008-06-16 21:46:40 UTC
(In reply to comment #8)
> Ah, just tried again, and figured what happened. When you get to the page with
> the pre-upload warnings, if you choose to return to the upload form, the
> "ignore warnings" checkbox is automatically checked, even though it wasn't
> before (otherwise you wouldn't see the warnings in the first place). I don't
> know why that happens, it doesn't make sense to me. It would if the option was
> stored permanently, but it's not. And in that specific case if you originally
> wanted to ignore the warnings you wouldn't have returned to the upload form,
> but rather continued with the upload.
> 
> Perhaps I should file a new bug for this (usability?) problem...
> 

This was bug 14551. Fixed with r36318 today.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links