+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 17

Thread: uploading files to different folder

Share/Bookmark
  1. #1

    Default uploading files to different folder

    When I upload ZIP files they are automatically stored in the images folder, so that the file URL looks like this:

    http://www.bd-fans.com/wiki/images/e/ec/File.zip

    How can I make that ZIP files, DOC files, TXT files, etc. are all uploaded to a 'files' directory?

    thanks in advance.

  2. #2
    Super Moderator Michael Daly will become famous soon enough Michael Daly will become famous soon enough Michael Daly's Avatar
    Join Date
    May 2006
    Location
    Homeless and OTR, Canada
    Posts
    4,418
    Rep Power
    10

    Default

    You can't. At least, not without a major re-write of Mediawiki to support multiple file paths.
    Private message are for private information. Please post public questions. Thanks

  3. #3

    Default

    Quote Originally Posted by Michael Daly View Post
    You can't. At least, not without a major re-write of Mediawiki to support multiple file paths.
    But then, is it possible to rename the 'images' directory to 'files' so that both images and ZIP files are stored in the 'files' directory?

  4. #4
    Super Moderator Michael Daly will become famous soon enough Michael Daly will become famous soon enough Michael Daly's Avatar
    Join Date
    May 2006
    Location
    Homeless and OTR, Canada
    Posts
    4,418
    Rep Power
    10

    Default

    If you are using 1.14 or newer, File is the visible namespace name. However, you are stuck with /images/ as a directory name unless you want to do a lot of work on the core code.
    Private message are for private information. Please post public questions. Thanks

  5. #5

    Default

    Quote Originally Posted by Michael Daly View Post
    If you are using 1.14 or newer, File is the visible namespace name. However, you are stuck with /images/ as a directory name unless you want to do a lot of work on the core code.
    But I am using version 1.14, and still it says /images/ instead of /file/!

  6. #6
    Super Moderator Michael Daly will become famous soon enough Michael Daly will become famous soon enough Michael Daly's Avatar
    Join Date
    May 2006
    Location
    Homeless and OTR, Canada
    Posts
    4,418
    Rep Power
    10

    Default

    The directory is images; the namespace is File:. The namespace used to be Images.
    Private message are for private information. Please post public questions. Thanks

  7. #7

    Default

    OK thank you. It's a shame this can't be changed. well, perhaps in a newer version..

  8. #8
    Super Moderator Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    2,446
    Rep Power
    7

    Default

    Quote Originally Posted by Martijn View Post
    OK thank you. It's a shame this can't be changed. well, perhaps in a newer version..
    How is it a shame? That sounds like a needlessly confusing directory structure and a ton of extra code to make it work. Just rename /images to /files and update $wgUploadPath and $wgUploadDirectory in LocalSettings.php

    You might need to run the rebuildImages.php afterwards as well
    --Skizzerz (MediaWiki | StrategyWiki)

    How am I helping? Rate this post by clicking the icon below!

    Private messages are for private information. I will ignore any support requests in private messages.

    NEVER EDIT CORE FILES! Revert any core modifications you make before asking for help here. I will not give support for modified versions of MediaWiki (but I will yell at you)

  9. #9

    Default

    Quote Originally Posted by Skizzerz View Post
    How is it a shame? That sounds like a needlessly confusing directory structure and a ton of extra code to make it work. Just rename /images to /files and update $wgUploadPath and $wgUploadDirectory in LocalSettings.php

    You might need to run the rebuildImages.php afterwards as well
    This does not work. The images and files must be loaded from the /files directory as well. Where can I change that?

    If I only change the directory name from /images to /files the website works fine, but can's (of course) load the images.

    If I update
    $wgUploadPath = "/images"
    $wgUploadDirectory = "/images"

    the website can't be accessed any more...

  10. #10
    Super Moderator Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    2,446
    Rep Power
    7

    Default

    Define "website can't be accessed any more..."
    --Skizzerz (MediaWiki | StrategyWiki)

    How am I helping? Rate this post by clicking the icon below!

    Private messages are for private information. I will ignore any support requests in private messages.

    NEVER EDIT CORE FILES! Revert any core modifications you make before asking for help here. I will not give support for modified versions of MediaWiki (but I will yell at you)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Trouble Uploading XSL Files
    By cacois in forum Customizing MediaWiki
    Replies: 5
    Last Post: June 20th, 2009, 06:47
  2. uploading multiple files at once
    By Martijn in forum Wiki Editing
    Replies: 18
    Last Post: May 23rd, 2009, 15:33
  3. Uploading swf files
    By sun in forum Configuration
    Replies: 2
    Last Post: January 8th, 2009, 11:35
  4. Uploading .wav files to Wiki
    By JasonCacti in forum Customizing MediaWiki
    Replies: 2
    Last Post: November 13th, 2008, 20:29
  5. Problem with uploading files (ver 1.5.x)
    By meohoang in forum MediaWiki General Discussion
    Replies: 3
    Last Post: February 14th, 2006, 21:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts