Last modified: 2014-02-12 23:35:37 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 T32202, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30202 - New version of file with very long name cannot be uploaded
New version of file with very long name cannot be uploaded
Status: NEW
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 30203 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-03 16:54 UTC by folengo
Modified: 2014-02-12 23:35 UTC (History)
8 users (show)

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


Attachments

Description folengo 2011-08-03 16:54:58 UTC
After succesfully uploading on Wikimedia Commons a 36 KB low resolution picture as a test, I tried to upload an update with the full resolution 17 MB version under the same file name. But I experienced the following error message :

Could not rename file "public/4/43/A_design_to_represent_the_beginning_and_completion_of_an_American_settlement_or_farm_-_Dessein_qui_represente_la_maniere_d'etablir_et_de_parachever_une_habitation_ou_ferme_Americaine,_by_P_Sandby,_from_a_design_by_Gov_Pownal,_engraved_by_J_Peake.jpg" to "public/archive/4/43/20110803152543!A_design_to_represent_the_beginning_and_completion_of_an_American_settlement_or_farm_-_Dessein_qui_represente_la_maniere_d'etablir_et_de_parachever_une_habitation_ou_ferme_Americaine,_by_P_Sandby,_from_a_design_by_Gov_Pownal,_engraved_by_J_Peake.jpg". 

I tried a second time again and had

Could not rename file "public/4/43/A_design_to_represent_the_beginning_and_completion_of_an_American_settlement_or_farm_-_Dessein_qui_represente_la_maniere_d'etablir_et_de_parachever_une_habitation_ou_ferme_Americaine,_by_P_Sandby,_from_a_design_by_Gov_Pownal,_engraved_by_J_Peake.jpg" to "public/archive/4/43/20110803154514!A_design_to_represent_the_beginning_and_completion_of_an_American_settlement_or_farm_-_Dessein_qui_represente_la_maniere_d'etablir_et_de_parachever_une_habitation_ou_ferme_Americaine,_by_P_Sandby,_from_a_design_by_Gov_Pownal,_engraved_by_J_Peake.jpg". 

I finally decided to upload the high resolution version under a different name.

I wonder if the problem might not be that the new file name length, with the extra "20110803152543!" part is exceeding the maximum filename length 256 B limit.
Comment 1 Mark A. Hershberger 2011-08-03 17:15:31 UTC
*** Bug 30203 has been marked as a duplicate of this bug. ***
Comment 2 Brion Vibber 2011-08-15 20:18:22 UTC
Indeed! Looks like the max file name length on ext2 family and ZFS is 255 chars; unsure whether NFS enforces the same.

oi_archive_name entry will also be cut off at 255 chars, so it'd still be unusable.

Finally switching the image/oldimage system to a modern space with content-based hashes as internal IDs and low-level filenames would help with this by eliminating the need to create and use such filenames based on user input... can't find a good BZ entry to hit though.

(Bug 1780 has similar issues related to encoding -- it got marked as "fixed" despite not being fixed, have reopened it. Bug 363 proposes actual file storage in DB blobs which is unnecessary. Hash-based storage got implemented years ago for deleted files, but the interface for it for some reason didn't get extended fully with the Image->File refactoring that happened afterwards.)
Comment 3 Bryan Tong Minh 2011-09-29 18:43:24 UTC
Restricting the file name to 240 bytes should resolve this, until somebody implements the hash based storage.
Comment 4 Bryan Tong Minh 2011-09-29 19:03:22 UTC
Done the 240 bytes thing in r98430.

Legacy long files are not affected by this; they should be moved manually. That reminds me, this restriction should also be enforced in Title::isValidMoveOperation. Leaving this bug open for that.

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


Navigation
Links