Last modified: 2007-01-09 02:25:12 UTC
This may be considered a duplicate of request 3336, "use directory structure for file uploads" (closed as "wontfix" on 2005-09-06). I'm posting it as a new one because I don't know if it is acceptable to reopen a closed bug. I'm interested on having the ability of uploading files to different subdirectories (preserve the directory structure), i.e, to be able to upload [[Image:/dir1/image.png]] and [[Image:/dir2/image.png]]. The current behavior is that the image gets uploaded as Image.png, and none of those links work. My proposal is to create the directories as needed, so they'll both work and point to different images. Advantage: on some situations, there is conflict with the filenames. For instance, on my university, two professors cannot upload a [[Media:Conference1.pdf]]. This proposal would allow them to upload a [[Media:class1/Conference1.pdf]] and [[Media:class2/Conference1.pdf]] and solve the conflict. Disadvantages: I don't know - yet. I wrote a patch that implements this. I hope I can attach it to this thread after I submit it. Please look at the commented section that asks "Why is this here?". I couldn't figure out if it was required because of security concerns.
Generally you should make your arguments in the closed bug and let the devs decide whether to reopen. If you really want to you can reopen it yourself, but don't be surprised if it's reclosed quite quickly. *** This bug has been marked as a duplicate of 3336 ***
Note that you can simply name them 'Class1 - Conference1.pdf' etc.
Created attachment 3036 [details] Preserves the directory structure of uploaded files It applies against mediawiki 1.6 and 1.9 (svn). Please check the commented section with the notice "Why is this here?" as I didn't manage to find out the answer. This patch is the only reason why I reposted a "wontfix".
Oops, sorry. That was quick. I'll post it back there, then.